diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-09-09 22:23:41 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-09-09 22:23:41 +0200 |
commit | 23bcf666855461ed0e87114d359a777777078e7c (patch) | |
tree | cdc29c573e6bf9fa9b20f2365291e4029a3e684c /client | |
parent | 4b2f33f3c6d109365090b08244d7f99ad4e69025 (diff) | |
download | PeerTube-23bcf666855461ed0e87114d359a777777078e7c.tar.gz PeerTube-23bcf666855461ed0e87114d359a777777078e7c.tar.zst PeerTube-23bcf666855461ed0e87114d359a777777078e7c.zip |
Client: little app module cleanup
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/app.module.ts | 73 |
1 files changed, 41 insertions, 32 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index f071224c5..3b7750a76 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -1,14 +1,14 @@ | |||
1 | import { NgModule, ApplicationRef } from '@angular/core'; | 1 | import { ApplicationRef, NgModule } from '@angular/core'; |
2 | import { BrowserModule } from '@angular/platform-browser'; | 2 | import { BrowserModule } from '@angular/platform-browser'; |
3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | 3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
4 | import { HttpModule, RequestOptions, XHRBackend } from '@angular/http'; | 4 | import { HttpModule, RequestOptions, XHRBackend } from '@angular/http'; |
5 | import { RouterModule } from '@angular/router'; | 5 | import { RouterModule } from '@angular/router'; |
6 | import { removeNgStyles, createNewHosts } from '@angularclass/hmr'; | 6 | import { removeNgStyles, createNewHosts } from '@angularclass/hmr'; |
7 | 7 | ||
8 | import { FileSelectDirective } from 'ng2-file-upload/ng2-file-upload'; | 8 | import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; |
9 | import { ProgressbarModule } from 'ng2-bootstrap/components/progressbar'; | 9 | import { ProgressbarModule } from 'ng2-bootstrap/components/progressbar'; |
10 | import { PaginationModule } from 'ng2-bootstrap/components/pagination'; | 10 | import { PaginationModule } from 'ng2-bootstrap/components/pagination'; |
11 | import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; | 11 | import { FileSelectDirective } from 'ng2-file-upload/ng2-file-upload'; |
12 | 12 | ||
13 | /* | 13 | /* |
14 | * Platform and Environment providers/directives/pipes | 14 | * Platform and Environment providers/directives/pipes |
@@ -18,8 +18,23 @@ import { routes } from './app.routes'; | |||
18 | // App is our top level component | 18 | // App is our top level component |
19 | import { AppComponent } from './app.component'; | 19 | import { AppComponent } from './app.component'; |
20 | import { AppState } from './app.service'; | 20 | import { AppState } from './app.service'; |
21 | |||
22 | import { | ||
23 | AdminComponent, | ||
24 | FriendsComponent, | ||
25 | FriendAddComponent, | ||
26 | FriendListComponent, | ||
27 | FriendService, | ||
28 | MenuAdminComponent, | ||
29 | UsersComponent, | ||
30 | UserAddComponent, | ||
31 | UserListComponent, | ||
32 | UserService | ||
33 | } from './admin'; | ||
21 | import { AccountComponent, AccountService } from './account'; | 34 | import { AccountComponent, AccountService } from './account'; |
22 | import { LoginComponent } from './login'; | 35 | import { LoginComponent } from './login'; |
36 | import { MenuComponent } from './menu.component'; | ||
37 | import { AuthService, AuthHttp, RestExtractor, RestService, SearchComponent, SearchService } from './shared'; | ||
23 | import { | 38 | import { |
24 | LoaderComponent, | 39 | LoaderComponent, |
25 | VideosComponent, | 40 | VideosComponent, |
@@ -31,20 +46,6 @@ import { | |||
31 | VideoService, | 46 | VideoService, |
32 | WebTorrentService | 47 | WebTorrentService |
33 | } from './videos'; | 48 | } from './videos'; |
34 | import { | ||
35 | FriendsComponent, | ||
36 | FriendAddComponent, | ||
37 | FriendListComponent, | ||
38 | FriendService, | ||
39 | UsersComponent, | ||
40 | UserAddComponent, | ||
41 | UserListComponent, | ||
42 | UserService, | ||
43 | AdminComponent, | ||
44 | MenuAdminComponent | ||
45 | } from './admin'; | ||
46 | import { MenuComponent } from './menu.component'; | ||
47 | import { AuthService, AuthHttp, RestExtractor, RestService, SearchComponent, SearchService } from './shared'; | ||
48 | 49 | ||
49 | // Application wide providers | 50 | // Application wide providers |
50 | const APP_PROVIDERS = [ | 51 | const APP_PROVIDERS = [ |
@@ -60,7 +61,14 @@ const APP_PROVIDERS = [ | |||
60 | 61 | ||
61 | AuthService, | 62 | AuthService, |
62 | RestExtractor, | 63 | RestExtractor, |
63 | RestExtractor, RestService, VideoService, SearchService, FriendService, UserService, AccountService, WebTorrentService | 64 | RestService, |
65 | |||
66 | VideoService, | ||
67 | SearchService, | ||
68 | FriendService, | ||
69 | UserService, | ||
70 | AccountService, | ||
71 | WebTorrentService | ||
64 | ]; | 72 | ]; |
65 | /** | 73 | /** |
66 | * `AppModule` is the main entry point into Angular2's bootstraping process | 74 | * `AppModule` is the main entry point into Angular2's bootstraping process |
@@ -68,28 +76,28 @@ const APP_PROVIDERS = [ | |||
68 | @NgModule({ | 76 | @NgModule({ |
69 | bootstrap: [ AppComponent ], | 77 | bootstrap: [ AppComponent ], |
70 | declarations: [ | 78 | declarations: [ |
79 | AccountComponent, | ||
80 | AdminComponent, | ||
71 | AppComponent, | 81 | AppComponent, |
72 | BytesPipe, | 82 | BytesPipe, |
73 | FileSelectDirective, | 83 | FileSelectDirective, |
74 | AccountComponent, | 84 | FriendAddComponent, |
75 | LoginComponent, | 85 | FriendListComponent, |
86 | FriendsComponent, | ||
76 | LoaderComponent, | 87 | LoaderComponent, |
77 | VideosComponent, | 88 | LoginComponent, |
89 | MenuAdminComponent, | ||
90 | MenuComponent, | ||
91 | SearchComponent, | ||
92 | UserAddComponent, | ||
93 | UserListComponent, | ||
94 | UsersComponent, | ||
78 | VideoAddComponent, | 95 | VideoAddComponent, |
79 | VideoListComponent, | 96 | VideoListComponent, |
80 | VideoSortComponent, | ||
81 | VideoMiniatureComponent, | 97 | VideoMiniatureComponent, |
98 | VideosComponent, | ||
99 | VideoSortComponent, | ||
82 | VideoWatchComponent, | 100 | VideoWatchComponent, |
83 | FriendsComponent, | ||
84 | FriendAddComponent, | ||
85 | FriendListComponent, | ||
86 | UsersComponent, | ||
87 | UserAddComponent, | ||
88 | UserListComponent, | ||
89 | AdminComponent, | ||
90 | MenuAdminComponent, | ||
91 | MenuComponent, | ||
92 | SearchComponent | ||
93 | ], | 101 | ], |
94 | imports: [ // import Angular's modules | 102 | imports: [ // import Angular's modules |
95 | BrowserModule, | 103 | BrowserModule, |
@@ -97,6 +105,7 @@ const APP_PROVIDERS = [ | |||
97 | ReactiveFormsModule, | 105 | ReactiveFormsModule, |
98 | HttpModule, | 106 | HttpModule, |
99 | RouterModule.forRoot(routes), | 107 | RouterModule.forRoot(routes), |
108 | |||
100 | ProgressbarModule, | 109 | ProgressbarModule, |
101 | PaginationModule | 110 | PaginationModule |
102 | ], | 111 | ], |