aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.resolver.ts
diff options
context:
space:
mode:
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];