Last active
June 8, 2017 10:17
-
-
Save Rome-H/ea8108c3beb432508656992c10c96359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'bot-detail-header', | |
template: ` | |
<h2>{{bot?.description}}</h2> | |
<h5>Total completed Rescues: {{completedRescues?.length}}</h5> | |
<newsletter [firstName]="firstName" (subscribe)="onSubscribe($event)"></newsletter> | |
`, | |
changeDetection: ChangeDetectionStrategy.OnPush | |
}) | |
export class BotDetailHeaderComponent { | |
@Input() bot: Bot; | |
@Input() completedRescues: CompletedRescue[]; | |
@Input() firstName:string; | |
@Output() subscribe = new EventEmitter(); | |
onSubscribe(email:string) { | |
this.subscribe.emit(email); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment