mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix back button, add deprecation warnings
This commit is contained in:
@@ -85,8 +85,9 @@ ion-title {
|
||||
background-color: $color-value;
|
||||
border-color: darken($color-value, 10%);
|
||||
}
|
||||
|
||||
.toolbar-title {
|
||||
|
||||
.toolbar-title,
|
||||
.bar-button-default {
|
||||
color: inverse($color-value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ export class ToolbarTitle extends Ion {
|
||||
* @private
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-buttons,[menu-toggle]'
|
||||
selector: 'ion-buttons,[menu-toggle],ion-nav-items'
|
||||
})
|
||||
export class ToolbarItem {
|
||||
constructor(
|
||||
@@ -160,6 +160,23 @@ export class ToolbarItem {
|
||||
toolbar && toolbar.addItemRef(elementRef);
|
||||
navbar && navbar.addItemRef(elementRef);
|
||||
this.inToolbar = !!(toolbar || navbar);
|
||||
|
||||
// Deprecation warning
|
||||
if (elementRef.nativeElement.tagName === 'ION-NAV-ITEMS') {
|
||||
|
||||
if (elementRef.nativeElement.hasAttribute('primary')) {
|
||||
console.warn('<ion-nav-items primary> has been renamed to <ion-buttons start>, please update your HTML');
|
||||
elementRef.nativeElement.setAttribute('start', '');
|
||||
|
||||
} else if (elementRef.nativeElement.hasAttribute('secondary')) {
|
||||
console.warn('<ion-nav-items secondary> has been renamed to <ion-buttons end>, please update your HTML');
|
||||
elementRef.nativeElement.setAttribute('end', '');
|
||||
|
||||
} else {
|
||||
console.warn('<ion-nav-items> has been renamed to <ion-buttons>, please update your HTML');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ContentChildren(Button)
|
||||
|
||||
Reference in New Issue
Block a user