aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r--client/src/app/app.component.ts19
1 files changed, 8 insertions, 11 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 81b700a21..2a1486fb2 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -1,6 +1,6 @@
1import { Component } from '@angular/core'; 1import { Component } from '@angular/core';
2import { HTTP_PROVIDERS } from '@angular/http'; 2import { HTTP_PROVIDERS } from '@angular/http';
3import { RouteConfig, Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated'; 3import { Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, Routes } from '@angular/router';
4 4
5import { FriendService } from './friends'; 5import { FriendService } from './friends';
6import { LoginComponent } from './login'; 6import { LoginComponent } from './login';
@@ -16,27 +16,23 @@ import {
16 VideoWatchComponent, 16 VideoWatchComponent,
17 VideoService 17 VideoService
18} from './videos'; 18} from './videos';
19import { SearchService } from './shared'; // Temporary
19 20
20@RouteConfig([ 21@Routes([
21 { 22 {
22 path: '/users/login', 23 path: '/users/login',
23 name: 'UserLogin',
24 component: LoginComponent 24 component: LoginComponent
25 }, 25 },
26 { 26 {
27 path: '/videos/list', 27 path: '/videos/list',
28 name: 'VideosList', 28 component: VideoListComponent
29 component: VideoListComponent,
30 useAsDefault: true
31 }, 29 },
32 { 30 {
33 path: '/videos/watch/:id', 31 path: '/videos/watch/:id',
34 name: 'VideosWatch',
35 component: VideoWatchComponent 32 component: VideoWatchComponent
36 }, 33 },
37 { 34 {
38 path: '/videos/add', 35 path: '/videos/add',
39 name: 'VideosAdd',
40 component: VideoAddComponent 36 component: VideoAddComponent
41 } 37 }
42]) 38])
@@ -46,7 +42,7 @@ import {
46 template: require('./app.component.html'), 42 template: require('./app.component.html'),
47 styles: [ require('./app.component.scss') ], 43 styles: [ require('./app.component.scss') ],
48 directives: [ ROUTER_DIRECTIVES, SearchComponent ], 44 directives: [ ROUTER_DIRECTIVES, SearchComponent ],
49 providers: [ AuthService, FriendService, HTTP_PROVIDERS, ROUTER_PROVIDERS, VideoService ] 45 providers: [ AuthService, FriendService, HTTP_PROVIDERS, ROUTER_PROVIDERS, VideoService, SearchService ]
50}) 46})
51 47
52export class AppComponent { 48export class AppComponent {
@@ -75,12 +71,13 @@ export class AppComponent {
75 field: search.field, 71 field: search.field,
76 search: search.value 72 search: search.value
77 }; 73 };
78 this.router.navigate(['VideosList', params]); 74 this.router.navigate(['/videos/list', params]);
79 } else { 75 } else {
80 this.router.navigate(['VideosList']); 76 this.router.navigate(['/videos/list']);
81 } 77 }
82 } 78 }
83 79
80 // FIXME
84 logout() { 81 logout() {
85 // this._authService.logout(); 82 // this._authService.logout();
86 } 83 }