Angular Router: Preloading Modules
Victor Savkin

Hi ! Congrats for the article, it’s awesome !

I’ve tried to make it work, and there’s one little thing I’ve had to change.

In the PreloadingStrategy implementation, at the ternary operator, two things:

  1. is not an existing property at the moment of the evaluation.
  2. of(null) is a sentence that ts doesn´t compile.

So, I ve changed this :

return && ? load() : of(null);

For this:

return &&[‘preload’] ? load() : Observable.of(null);

I wish someone find this helpful !

Congrats again ! :)

Like what you read? Give JC.Díez © a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.