blob: bc054e90b89bbeaf9e9b342c704562d855506688 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* tslint:disable */
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
import { Injectable } from '@angular/core'
import { Observable } from 'rxjs/Observable'
import 'rxjs/add/observable/of'
@Injectable()
export class DataResolver implements Resolve<any> {
public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
return Observable.of({ res: 'I am data'})
}
}
/**
* An array of services to resolve routes with data.
*/
export const APP_RESOLVER_PROVIDERS = [
DataResolver
]
|