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
<div style="background: ghostwhite"> | |
<h3> | |
<label>Name:</label> | |
<!--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()"> | |
Hello! | |
</button> | |
</h3> | |
<!-- conditionally display `message` --> | |
<h4 [hidden]="!message">{{message}}</h4> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment