aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/components/app/app.component.ts
blob: e2cebf5354a8e66dc5c70666f2b808a513628982 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import {Component} from 'angular2/core';
import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from 'angular2/router';

import { VideosAddComponent } from '../videos/add/videos-add.component';
import { VideosListComponent } from '../videos/list/videos-list.component';
import { VideosWatchComponent } from '../videos/watch/videos-watch.component';

@RouteConfig([
  {
    path: '/videos/list',
    name: 'VideosList',
    component: VideosListComponent,
    useAsDefault: true
  },
  {
    path: '/videos/watch/:id',
    name: 'VideosWatch',
    component: VideosWatchComponent
  },
  {
    path: '/videos/add',
    name: 'VideosAdd',
    component: VideosAddComponent
  }
])

@Component({
    selector: 'my-app',
    templateUrl: 'app/components/app/app.component.html',
    styleUrls: [ 'app/components/app/app.component.css' ],
    directives: [ ROUTER_DIRECTIVES ],
    providers: [ ROUTER_PROVIDERS ]
})

export class AppComponent {
  makeFriends() {
    alert('make Friends');
  }

  quitFriends() {
    alert('quit Friends');
  }
}