Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {Component} from "angular2/core";
- import {Router} from "angular2/router";
- import {Article} from "./article";
- @Component({
- template: `...`
- })
- export class LastArticles {
- constructor (private _router:Router) {
- }
- onClickArticle (article:Article) {
- this._router.navigate(['Article', {id: article.id}]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement