Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private shouldLoadInstantly(
elementLoadingStrategy: DeferLoadingStrategy
): boolean {
return (
isPlatformServer(this.platformId) ||
elementLoadingStrategy === DeferLoadingStrategy.INSTANT ||
(elementLoadingStrategy !== DeferLoadingStrategy.DEFER &&
this.globalLoadStrategy === DeferLoadingStrategy.INSTANT)
);
}
}
private useInstantLoading(): boolean {
return (
this.config.deferredLoading &&
this.config.deferredLoading.strategy === DeferLoadingStrategy.INSTANT
);
}
constructor(
@Inject(PLATFORM_ID) private platformId: Object,
protected config: LayoutConfig,
protected intersectionService: IntersectionService
) {
this.globalLoadStrategy = config.deferredLoading
? config.deferredLoading.strategy
: DeferLoadingStrategy.INSTANT;
}
private shouldLoadInstantly(
elementLoadingStrategy: DeferLoadingStrategy
): boolean {
return (
isPlatformServer(this.platformId) ||
elementLoadingStrategy === DeferLoadingStrategy.INSTANT ||
(elementLoadingStrategy !== DeferLoadingStrategy.DEFER &&
this.globalLoadStrategy === DeferLoadingStrategy.INSTANT)
);
}
}