|
|
|
@ -7,7 +7,7 @@ import { ABP } from '@abp/ng.core'; |
|
|
|
template: ` |
|
|
|
<button |
|
|
|
#button |
|
|
|
[attr.type]="buttonType || type" |
|
|
|
[attr.type]="buttonType" |
|
|
|
[ngClass]="buttonClass" |
|
|
|
[disabled]="loading || disabled" |
|
|
|
(click)="onClick($event)" |
|
|
|
@ -23,7 +23,7 @@ export class ButtonComponent implements OnInit { |
|
|
|
buttonClass = 'btn btn-primary'; |
|
|
|
|
|
|
|
@Input() |
|
|
|
buttonType; // TODO: Add initial value.
|
|
|
|
buttonType = 'button'; |
|
|
|
|
|
|
|
@Input() |
|
|
|
iconClass: string; |
|
|
|
@ -49,11 +49,6 @@ export class ButtonComponent implements OnInit { |
|
|
|
@ViewChild('button', { static: true }) |
|
|
|
buttonRef: ElementRef<HTMLButtonElement>; |
|
|
|
|
|
|
|
/** |
|
|
|
* @deprecated Use buttonType instead. To be deleted in v1 |
|
|
|
*/ |
|
|
|
@Input() type = 'button'; |
|
|
|
|
|
|
|
get icon(): string { |
|
|
|
return `${this.loading ? 'fa fa-spinner fa-spin' : this.iconClass || 'd-none'}`; |
|
|
|
} |
|
|
|
|