DigitMagazine

Example for template expression

Dec 17th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import {Component} from 'angular2/core'
  2. @Component({
  3.  
  4. selector: 'digil',
  5. providers: [],
  6. template:`
  7. <div>
  8. <h2>Hi {{userid}}</h2>
  9. </div>
  10. `,
  11. directives: []
  12. })
  13.  
  14. export class App {
  15. constructor() {
  16. this.userid = 'newid'
  17. }
  18. }
Add Comment
Please, Sign In to add comment