Created
April 6, 2020 16:09
-
-
Save CoreProgramm/476389c4168f8a314c9573fdb6451431 to your computer and use it in GitHub Desktop.
Two way data binding in Angular
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: 'app-root', | |
template: ` | |
Name : <input [(ngModel)]='name'> | |
<br> | |
You entered : {{name}} | |
` | |
}) | |
export class AppComponent { | |
name = 'John'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment