2017-06-16 07:32:15 -05:00
|
|
|
/* tslint:disable */
|
|
|
|
|
|
|
|
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
|
|
|
|
import { Injectable } from '@angular/core'
|
|
|
|
import { Observable } from 'rxjs/Observable'
|
|
|
|
import 'rxjs/add/observable/of'
|
2017-06-11 05:28:22 -05:00
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class DataResolver implements Resolve<any> {
|
|
|
|
public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
2017-06-16 07:32:15 -05:00
|
|
|
return Observable.of({ res: 'I am data'})
|
2017-06-11 05:28:22 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An array of services to resolve routes with data.
|
|
|
|
*/
|
|
|
|
export const APP_RESOLVER_PROVIDERS = [
|
|
|
|
DataResolver
|
2017-06-16 07:32:15 -05:00
|
|
|
]
|