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

@@ -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);
}
}

View File

@@ -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)