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
|
* @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.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
}.`
|
}.`
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user