Skip to content

Instantly share code, notes, and snippets.

Created January 24, 2016 15:36
What would you like to do?
<div style="background: ghostwhite">
<!--binding to component field-->
<input type="text" [(ngModel)]="name" placeholder="Enter a name here">
<!--binding click event to component method-->
<button class="btn btn-primary col-md-2" (click)="sayHello()">
<!-- conditionally display `message` -->
<h4 [hidden]="!message">{{message}}</h4>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment