mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
31 lines
530 B
TypeScript
31 lines
530 B
TypeScript
import {Directive} from 'angular2/angular2';
|
|
|
|
|
|
/**
|
|
* TODO
|
|
*/
|
|
@Directive({
|
|
selector: 'button,[button]',
|
|
host: {
|
|
'[class.icon-left]': 'iconLeft',
|
|
'[class.icon-right]': 'iconRight',
|
|
'[class.icon-only]': 'iconOnly'
|
|
}
|
|
})
|
|
export class Button {
|
|
|
|
constructor() {
|
|
this.iconLeft = this.iconRight = this.iconOnly = false;
|
|
}
|
|
|
|
/**
|
|
* TODO
|
|
* @param {TODO} icon TODO
|
|
*/
|
|
registerIcon(icon) {
|
|
this.iconLeft = icon.iconLeft;
|
|
this.iconRight = icon.iconRight;
|
|
this.iconOnly = icon.iconOnly;
|
|
}
|
|
}
|