DEV Community

Discussion on: Route-Fully-Rendered Detection in Angular

Collapse
 
hatsantos profile image
Helder Santos • Edited

Great article... I was searching for something that "globally" could let me know if the new route/page navigation was fully loaded (html binds/http requests/etc), but I'm facing some issues...

From where comes the this.navigationStart$ on the takeUntil()?

I was trying to pass the navStart$ subscription but I get an error:

"Uncaught TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable"

If I remove the takeUntil() it seems to be working but in the article it refers that may cause memory leaks... can someone help me?

Collapse
 
julianobrasil profile image
Juliano

It comes from the router events stream. You don't have to pass the subscription, but the observable itself.