import { Observable, of } from \"rxjs\";
// And if I try to return like this
return Observable.of(this.purposes);
I am getting an error stating
rxjs 6
import { PreloadingStrategy, Route } from '@angular/router';
import { Observable, of } from 'rxjs';
export class SelectivePreloadingStrategy implements PreloadingStrategy {
preload(route: Route, load: Function): Observable {
return route.data && route.data.preload === false ? of(null) : load();
}
}