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 {
- static get parameters() {
- return [[Router]];
- }
- constructor (_router) {
- this._router = _router;
- }
- onClickArticle (article) {
- this._router.navigate(['Article', {id: article.id}]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement