aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.resolver.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-11 12:28:22 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-11 12:28:22 +0200
commit8635a2c70cc24a4c52558162ac058de95750271f (patch)
treea9699b7c6696218604e6b273b4f34a6898d4f16b /client/src/app/app.resolver.ts
parent66dd264f7b15c05006faa00694c88c56794edc54 (diff)
downloadPeerTube-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.ts18
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 @@
1import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
2import { Injectable } from '@angular/core';
3import { Observable } from 'rxjs/Observable';
4import 'rxjs/add/observable/of';
5
6@Injectable()
7export 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 */
16export const APP_RESOLVER_PROVIDERS = [
17 DataResolver
18];