fix(item): do not add .item-button to button[ion-item]

This commit is contained in:
Adam Bradley
2016-01-04 14:52:53 -06:00
parent 2324f811e4
commit e2469d95e0
2 changed files with 6 additions and 2 deletions

View File

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

View File

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