mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
fix(angular): update console logs
This commit is contained in:
@ -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.`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}.`
|
||||
);
|
||||
|
Reference in New Issue
Block a user