Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import {Component} from 'angular2/core';
  2. import {View} from "angular2/core";
  3. import {RouteConfig, ROUTER_DIRECTIVES} from "angular2/router";
  4. import {LastArticles} from "./Articles/lastarticle";
  5. import {ArticleDetail} from "./Articles/articledetail";
  6.  
  7. @Component({
  8. selector: 'my-app',
  9. template: `...`,
  10. directives: ROUTER_DIRECTIVES
  11. })
  12.  
  13. @RouteConfig([
  14. { path: '/', name: 'Home', component: LastArticles },
  15. { path: '/article/:id', name: 'Article', component: ArticleDetail }
  16. ])
  17.  
  18. export class AppComponent {
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement