@Injectable()
export class AppResolver implements Resolve<MyComplexObject []> {
constructor(private myService: MyService, private router: Router) {}
resolve(route: ActivatedRouteSnapshot): Observable<MyComplexObject[]>|boolean {
let myParam = route.data['resolvedata'];
console.log(myParam);
}
}
{
path: 'project/:id',
component: ProjectComponent,
resolve: { data: AppResolver },
data: { resolvedata: 'myValue' }
}