Created
August 19, 2018 19:26
-
-
Save monirulalom/cdee0c3b79f8be6a5cd740b71150e5d5 to your computer and use it in GitHub Desktop.
ngModel two way binding
This file contains hidden or 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
| import { Component } from '@angular/core'; | |
| @Component({ | |
| selector: 'my-app', | |
| template: `<input [(ngModel)]='name' /> | |
| <h1>Hello {{name}}</h1> | |
| <h4>Edit the value in the input field </h4> | |
| ` | |
| }) | |
| export class AppComponent { | |
| name = 'Monirul Alom'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment