Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import {Component} from "angular2/core";
  2. import {Router} from "angular2/router";
  3.  
  4. import {Article} from "./article";
  5.  
  6. @Component({
  7. template: ...`
  8. `
  9. })
  10. export class LastArticles {
  11.  
  12. static get parameters() {
  13. return [[Router]];
  14. }
  15.  
  16. constructor (_router) {
  17.  
  18. this._router = _router;
  19.  
  20. }
  21.  
  22. onClickArticle (article) {
  23. this._router.navigate(['Article', {id: article.id}]);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement