mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 14:01:20 +08:00
fix(button): check for icon and add css after content checked
fixes #6662
This commit is contained in:
@ -210,6 +210,14 @@ export class Button {
|
||||
this._assignCss(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ngAfterContentChecked() {
|
||||
this._readIcon(this._elementRef.nativeElement);
|
||||
this._assignCss(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
@ -256,6 +264,9 @@ export class Button {
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any classes that are set already
|
||||
this._setClass(this._icon, false);
|
||||
|
||||
if (nodes.length > 1) {
|
||||
if (nodes[0] === ICON && nodes[1] === TEXT) {
|
||||
this._icon = 'icon-left';
|
||||
|
Reference in New Issue
Block a user