mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(angular): lint issue
This commit is contained in:
@ -59,7 +59,6 @@ export class IonTabs {
|
||||
@HostListener('ionTabButtonClick', ['$event.detail'])
|
||||
onTabButtonClick(detail: TabButtonClickDetail) {
|
||||
const { tab, selected } = detail;
|
||||
if (tab) {
|
||||
const href = `${this.outlet.tabsPrefix}/${tab}`;
|
||||
const url = selected
|
||||
? href
|
||||
@ -67,5 +66,4 @@ export class IonTabs {
|
||||
|
||||
this.navCtrl.navigateBack(url, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,9 @@ export class TabButton implements ComponentInterface {
|
||||
if (this.layout === undefined) {
|
||||
this.layout = this.config.get('tabButtonLayout', 'icon-top');
|
||||
}
|
||||
if (isNotDefined(this.tab)) {
|
||||
console.error('Missing "tab" property in <ion-tab-button>');
|
||||
}
|
||||
}
|
||||
|
||||
private get hasLabel() {
|
||||
@ -117,3 +120,7 @@ export class TabButton implements ComponentInterface {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function isNotDefined(a: any) {
|
||||
return a == null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user