diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-11 12:28:22 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-11 12:28:22 +0200 |
commit | 8635a2c70cc24a4c52558162ac058de95750271f (patch) | |
tree | a9699b7c6696218604e6b273b4f34a6898d4f16b /client/src/app/app.resolver.ts | |
parent | 66dd264f7b15c05006faa00694c88c56794edc54 (diff) | |
download | PeerTube-8635a2c70cc24a4c52558162ac058de95750271f.tar.gz PeerTube-8635a2c70cc24a4c52558162ac058de95750271f.tar.zst PeerTube-8635a2c70cc24a4c52558162ac058de95750271f.zip |
Update client modules
Diffstat (limited to 'client/src/app/app.resolver.ts')
-rw-r--r-- | client/src/app/app.resolver.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/app/app.resolver.ts b/client/src/app/app.resolver.ts new file mode 100644 index 000000000..45774b8d1 --- /dev/null +++ b/client/src/app/app.resolver.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; | ||
2 | import { Injectable } from '@angular/core'; | ||
3 | import { Observable } from 'rxjs/Observable'; | ||
4 | import 'rxjs/add/observable/of'; | ||
5 | |||
6 | @Injectable() | ||
7 | export class DataResolver implements Resolve<any> { | ||
8 | public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { | ||
9 | return Observable.of({ res: 'I am data'}); | ||
10 | } | ||
11 | } | ||
12 | |||
13 | /** | ||
14 | * An array of services to resolve routes with data. | ||
15 | */ | ||
16 | export const APP_RESOLVER_PROVIDERS = [ | ||
17 | DataResolver | ||
18 | ]; | ||