diff --git a/packages/angular/common/src/directives/navigation/nav-params.ts b/packages/angular/common/src/directives/navigation/nav-params.ts index 23f4125aff..36e80d6d63 100644 --- a/packages/angular/common/src/directives/navigation/nav-params.ts +++ b/packages/angular/common/src/directives/navigation/nav-params.ts @@ -1,3 +1,5 @@ +import { printIonWarning } from '@ionic/core'; + /** * @description * NavParams are an object that exists on a page and can contain data for that particular view. @@ -20,8 +22,8 @@ */ export class NavParams { constructor(public data: { [key: string]: any } = {}) { - console.warn( - `[Ionic Warning]: NavParams has been deprecated in favor of using Angular's input API. Developers should migrate to either the @Input decorator or the Signals-based input API.` + printIonWarning( + `NavParams has been deprecated in favor of using Angular's input API. Developers should migrate to either the @Input decorator or the Signals-based input API.` ); } diff --git a/packages/angular/common/src/directives/navigation/tabs.ts b/packages/angular/common/src/directives/navigation/tabs.ts index 73e8c0cc77..37fec014b5 100644 --- a/packages/angular/common/src/directives/navigation/tabs.ts +++ b/packages/angular/common/src/directives/navigation/tabs.ts @@ -10,6 +10,7 @@ import { AfterViewInit, QueryList, } from '@angular/core'; +import { printIonError } from '@ionic/core'; import { NavController } from '../../providers/nav-controller'; @@ -184,7 +185,7 @@ export abstract class IonTabs implements AfterViewInit, AfterContentInit, AfterC const selectedTab = tabs.find((t: any) => t.tab === tab); if (!selectedTab) { - console.error(`[Ionic Error]: Tab with id: "${tab}" does not exist`); + printIonError(`Tab with id: "${tab}" does not exist`); return; } diff --git a/packages/angular/common/src/providers/angular-delegate.ts b/packages/angular/common/src/providers/angular-delegate.ts index fc794c0e34..9446b2e4e0 100644 --- a/packages/angular/common/src/providers/angular-delegate.ts +++ b/packages/angular/common/src/providers/angular-delegate.ts @@ -9,6 +9,7 @@ import { InjectionToken, ComponentRef, } from '@angular/core'; +import { printIonError } from '@ionic/core'; import { FrameworkDelegate, LIFECYCLE_DID_ENTER, @@ -164,8 +165,8 @@ export const attachView = ( * which will cause collisions. */ if (elementReferenceKey && instance[elementReferenceKey] !== undefined) { - console.error( - `[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${ + printIonError( + `${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${ component.name }.` );