File
Metadata
changeDetection |
ChangeDetectionStrategy.OnPush |
selector |
checkout-submit-button-ui |
styleUrls |
./checkout-submit-button-ui.component.scss |
templateUrl |
./checkout-submit-button-ui.component.html |
Outputs
onSubmit
|
Type : EventEmitter<any>
|
|
import { Component, Output, EventEmitter, Input, ChangeDetectionStrategy } from "@angular/core"
@Component({
selector: 'checkout-submit-button-ui',
templateUrl: './checkout-submit-button-ui.component.html',
styleUrls: ['./checkout-submit-button-ui.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CheckoutSubmitButtonUiComponent {
@Output() onSubmit: EventEmitter<any> = new EventEmitter<any>()
@Input() isDisabled: boolean
@Input() fontColor: string
}
<div class="checkout-submit-button-container" fxLayoutAlign="center center">
<button
mat-raised-button
color="primary"
(click)="onSubmit.emit()"
[disabled]="isDisabled"
[style.color]="fontColor ? fontColor : 'rgba(0,0,0,.87)'">
Checkout
</button>
</div>
Legend
Html element with directive