fix back button, add deprecation warnings

This commit is contained in:
Adam Bradley
2015-12-08 15:48:40 -06:00
parent eb39909fd5
commit ce2e4a3e32
12 changed files with 46 additions and 18 deletions

View File

@@ -34,6 +34,11 @@ export class MenuToggle extends Ion {
this.app = app;
this.viewCtrl = viewCtrl;
this.withinNavbar = !!navbar;
// Deprecation warning
if (this.withinNavbar && elementRef.nativeElement.tagName === 'A') {
console.warn('Menu toggles within a navbar should use <button menu-toggle> instead of <a toggle>')
}
}
/**

View File

@@ -1,8 +1,8 @@
<ion-navbar *navbar>
<a [menu-toggle]="activeMenu">
<button [menu-toggle]="activeMenu">
<icon menu></icon>
</a>
</button>
<ion-title>
Multiple Menus
</ion-title>