diff --git a/src/components/backdrop/backdrop.ts b/src/components/backdrop/backdrop.ts index b839b3a393c..66abbed1670 100644 --- a/src/components/backdrop/backdrop.ts +++ b/src/components/backdrop/backdrop.ts @@ -3,7 +3,6 @@ import { Directive, ElementRef, Input } from '@angular/core'; import { AppRoot } from '../app/app'; import { isTrueProperty } from '../../util/util'; -const DISABLE_SCROLL = 'disable-scroll'; /** * @private diff --git a/src/components/button/button.ts b/src/components/button/button.ts index cd282f7ae6d..a060da8a9d4 100644 --- a/src/components/button/button.ts +++ b/src/components/button/button.ts @@ -226,7 +226,10 @@ export class Button { * @private */ setRole(val: string) { + this._assignCss(false); this._role = val; + this._readIcon(this._elementRef.nativeElement); + this._assignCss(true); } /** @@ -350,16 +353,6 @@ export class Button { } } - /** - * @private - */ - static setRoles(contentButtonChildren: any, role: string) { - let buttons = contentButtonChildren.toArray(); - buttons.forEach((button: any) => { - button.setRole(role); - }); - } - } const BUTTON_SIZE_ATTRS = ['large', 'small', 'default']; diff --git a/src/components/button/test/dynamic/index.ts b/src/components/button/test/dynamic/index.ts index 6e025e6571d..3c02c71e3dd 100644 --- a/src/components/button/test/dynamic/index.ts +++ b/src/components/button/test/dynamic/index.ts @@ -16,6 +16,7 @@ class E2EPage { myColor1: string; myColor2: string; multiColor: Array; + showIf: boolean = true; constructor() { this.reset(); diff --git a/src/components/button/test/dynamic/main.html b/src/components/button/test/dynamic/main.html index 6faac749379..77b64592903 100644 --- a/src/components/button/test/dynamic/main.html +++ b/src/components/button/test/dynamic/main.html @@ -2,6 +2,7 @@ + Default Buttons @@ -25,6 +26,8 @@
+ +
diff --git a/src/components/toolbar/toolbar-item.ts b/src/components/toolbar/toolbar-item.ts index a0254eacd49..699ff46d203 100644 --- a/src/components/toolbar/toolbar-item.ts +++ b/src/components/toolbar/toolbar-item.ts @@ -27,7 +27,9 @@ export class ToolbarItem { @ContentChildren(Button) set _buttons(buttons: any) { if (this.inToolbar) { - Button.setRoles(buttons, 'bar-button'); + buttons.forEach((button: Button) => { + button.setRole('bar-button'); + }); } } }