Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {Component} from '@angular/core';
- @Component({
- selector: "two-way-binding",
- template: `
- <!-- Main component for a primary marketing message or call to action -->
- <div class="jumbotron">
- <h1>{{ title.title }}</h1>
- <p>{{ title.description }}</p>
- <p>Two Way Bidnig : {{ twoWay }}</p>
- <input type="text" [(ngModel)]="twoWay"><input type="button" value="Reset" (click)="twoWay='' ">
- </div>
- `
- })
- export class TwoWayBindingComponent {
- isActive = false;
- twoWay = "Hello Gagu";
- title = {
- title: "Two Way Binding",
- description: "Two Way Binding in angular 2."
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement