From e2469d95e09840dbbb500a061fac6de6975c54c2 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Mon, 4 Jan 2016 14:52:53 -0600 Subject: [PATCH] fix(item): do not add .item-button to button[ion-item] --- ionic/components/button/button.ts | 4 +++- ionic/components/item/item.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts index 12b3b236c9..932be6f642 100644 --- a/ionic/components/button/button.ts +++ b/ionic/components/button/button.ts @@ -37,7 +37,8 @@ export class Button { constructor( config: Config, private _elementRef: ElementRef, - private _renderer: Renderer + private _renderer: Renderer, + @Attribute('ion-item') ionItem: string ) { this._role = 'button'; // bar-button/item-button this._size = null; // large/small @@ -48,6 +49,7 @@ export class Button { this._colors = []; // primary/secondary this._icon = null; // left/right/only this._disabled = false; // disabled + this.isItem = (ionItem === ''); let element = _elementRef.nativeElement; diff --git a/ionic/components/item/item.ts b/ionic/components/item/item.ts index 83764648d9..2d15430854 100644 --- a/ionic/components/item/item.ts +++ b/ionic/components/item/item.ts @@ -65,7 +65,9 @@ export class Item { @ContentChildren(Button) set _buttons(buttons) { buttons.toArray().forEach(button => { - button.addClass('item-button'); + if (!button.isItem) { + button.addClass('item-button'); + } }); }