Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import {Component} from '@angular/core';
  2.  
  3. @Component({
  4. selector: "two-way-binding",
  5. template: `
  6. <!-- Main component for a primary marketing message or call to action -->
  7. <div class="jumbotron">
  8. <h1>{{ title.title }}</h1>
  9. <p>{{ title.description }}</p>
  10. <p>Two Way Bidnig : {{ twoWay }}</p>
  11.  
  12. <input type="text" [(ngModel)]="twoWay"><input type="button" value="Reset" (click)="twoWay='' ">
  13.  
  14.  
  15.  
  16. </div>
  17.  
  18.  
  19.  
  20. `
  21. })
  22.  
  23. export class TwoWayBindingComponent {
  24. isActive = false;
  25.  
  26. twoWay = "Hello Gagu";
  27.  
  28. title = {
  29. title: "Two Way Binding",
  30. description: "Two Way Binding in angular 2."
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement