diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-07-08 17:15:14 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 14:26:56 +0200 |
commit | 0629423ce335137ce77d1ee8fe30fc0eee36d83b (patch) | |
tree | 41b4f5dcd86b7fb79c5892388444bd7063bb0d00 /client/src/app/app.component.ts | |
parent | 022856f8a54fe8810ebb599973984fd83ee7e7ec (diff) | |
download | PeerTube-0629423ce335137ce77d1ee8fe30fc0eee36d83b.tar.gz PeerTube-0629423ce335137ce77d1ee8fe30fc0eee36d83b.tar.zst PeerTube-0629423ce335137ce77d1ee8fe30fc0eee36d83b.zip |
Client: Update to Angular RC4
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 0cee6edbf..88b181f9c 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -1,52 +1,23 @@ | |||
1 | import { Component } from '@angular/core'; | 1 | import { Component } from '@angular/core'; |
2 | import { HTTP_PROVIDERS } from '@angular/http'; | 2 | import { HTTP_PROVIDERS } from '@angular/http'; |
3 | import { Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, Routes } from '@angular/router'; | 3 | import { Router, ROUTER_DIRECTIVES } from '@angular/router'; |
4 | 4 | ||
5 | import { FriendService } from './friends'; | 5 | import { FriendService } from './friends'; |
6 | import { LoginComponent } from './login'; | ||
7 | import { | 6 | import { |
8 | AuthService, | 7 | AuthService, |
9 | AuthStatus, | 8 | AuthStatus, |
10 | Search, | 9 | Search, |
11 | SearchComponent | 10 | SearchComponent, |
11 | SearchService | ||
12 | } from './shared'; | 12 | } from './shared'; |
13 | import { | 13 | import { VideoService } from './videos'; |
14 | VideoAddComponent, | ||
15 | VideoListComponent, | ||
16 | VideoWatchComponent, | ||
17 | VideoService | ||
18 | } from './videos'; | ||
19 | import { SearchService } from './shared'; // Temporary | ||
20 | |||
21 | @Routes([ | ||
22 | { | ||
23 | path: '/users/login', | ||
24 | component: LoginComponent | ||
25 | }, | ||
26 | { | ||
27 | path: '/videos/list', | ||
28 | component: VideoListComponent | ||
29 | }, | ||
30 | { | ||
31 | path: '/videos/watch/:id', | ||
32 | component: VideoWatchComponent | ||
33 | }, | ||
34 | { | ||
35 | path: '/videos/add', | ||
36 | component: VideoAddComponent | ||
37 | }, | ||
38 | { | ||
39 | path: '/', | ||
40 | component: VideoListComponent | ||
41 | } | ||
42 | ]) | ||
43 | 14 | ||
44 | @Component({ | 15 | @Component({ |
45 | selector: 'my-app', | 16 | selector: 'my-app', |
46 | template: require('./app.component.html'), | 17 | template: require('./app.component.html'), |
47 | styles: [ require('./app.component.scss') ], | 18 | styles: [ require('./app.component.scss') ], |
48 | directives: [ ROUTER_DIRECTIVES, SearchComponent ], | 19 | directives: [ ROUTER_DIRECTIVES, SearchComponent ], |
49 | providers: [ AuthService, FriendService, HTTP_PROVIDERS, ROUTER_PROVIDERS, VideoService, SearchService ] | 20 | providers: [ AuthService, FriendService, HTTP_PROVIDERS, VideoService, SearchService ] |
50 | }) | 21 | }) |
51 | 22 | ||
52 | export class AppComponent { | 23 | export class AppComponent { |
@@ -75,6 +46,7 @@ export class AppComponent { | |||
75 | field: search.field, | 46 | field: search.field, |
76 | search: search.value | 47 | search: search.value |
77 | }; | 48 | }; |
49 | |||
78 | this.router.navigate(['/videos/list', params]); | 50 | this.router.navigate(['/videos/list', params]); |
79 | } else { | 51 | } else { |
80 | this.router.navigate(['/videos/list']); | 52 | this.router.navigate(['/videos/list']); |