Skip to content

Instantly share code, notes, and snippets.

@Rome-H
Last active June 8, 2017 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rome-H/ea8108c3beb432508656992c10c96359 to your computer and use it in GitHub Desktop.
Save Rome-H/ea8108c3beb432508656992c10c96359 to your computer and use it in GitHub Desktop.
@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