aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-07-08 17:15:14 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-07-18 14:26:56 +0200
commit0629423ce335137ce77d1ee8fe30fc0eee36d83b (patch)
tree41b4f5dcd86b7fb79c5892388444bd7063bb0d00 /client/src/app/app.component.ts
parent022856f8a54fe8810ebb599973984fd83ee7e7ec (diff)
downloadPeerTube-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.ts40
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 @@
1import { Component } from '@angular/core'; 1import { Component } from '@angular/core';
2import { HTTP_PROVIDERS } from '@angular/http'; 2import { HTTP_PROVIDERS } from '@angular/http';
3import { Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, Routes } from '@angular/router'; 3import { Router, ROUTER_DIRECTIVES } from '@angular/router';
4 4
5import { FriendService } from './friends'; 5import { FriendService } from './friends';
6import { LoginComponent } from './login';
7import { 6import {
8 AuthService, 7 AuthService,
9 AuthStatus, 8 AuthStatus,
10 Search, 9 Search,
11 SearchComponent 10 SearchComponent,
11 SearchService
12} from './shared'; 12} from './shared';
13import { 13import { VideoService } from './videos';
14 VideoAddComponent,
15 VideoListComponent,
16 VideoWatchComponent,
17 VideoService
18} from './videos';
19import { 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
52export class AppComponent { 23export 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']);