fix(angular): update console logs

This commit is contained in:
Brandy Smith
2025-04-14 16:55:34 -04:00
parent cc389c0f43
commit 9b982bcbde
3 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,5 @@
import { printIonWarning } from '@ionic/core';
/** /**
* @description * @description
* NavParams are an object that exists on a page and can contain data for that particular view. * NavParams are an object that exists on a page and can contain data for that particular view.
@ -20,8 +22,8 @@
*/ */
export class NavParams { export class NavParams {
constructor(public data: { [key: string]: any } = {}) { constructor(public data: { [key: string]: any } = {}) {
console.warn( printIonWarning(
`[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.` `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.`
); );
} }

View File

@ -10,6 +10,7 @@ import {
AfterViewInit, AfterViewInit,
QueryList, QueryList,
} from '@angular/core'; } from '@angular/core';
import { printIonError } from '@ionic/core';
import { NavController } from '../../providers/nav-controller'; 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); const selectedTab = tabs.find((t: any) => t.tab === tab);
if (!selectedTab) { if (!selectedTab) {
console.error(`[Ionic Error]: Tab with id: "${tab}" does not exist`); printIonError(`Tab with id: "${tab}" does not exist`);
return; return;
} }

View File

@ -9,6 +9,7 @@ import {
InjectionToken, InjectionToken,
ComponentRef, ComponentRef,
} from '@angular/core'; } from '@angular/core';
import { printIonError } from '@ionic/core';
import { import {
FrameworkDelegate, FrameworkDelegate,
LIFECYCLE_DID_ENTER, LIFECYCLE_DID_ENTER,
@ -164,8 +165,8 @@ export const attachView = (
* which will cause collisions. * which will cause collisions.
*/ */
if (elementReferenceKey && instance[elementReferenceKey] !== undefined) { if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
console.error( printIonError(
`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${ `${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${
component.name component.name
}.` }.`
); );