DEV Community

loading...

Discussion on: That's why your Angular Interceptor may NOT WORK! 😥 [5 seconds fix]

Collapse
anduser96 profile image
Andrei Gatej

Hi!

I tried to reproduce the problem, but everything seems to be working fine even without the @SkipSelf() decorator.

StackBlitz

Did I miss something?

Collapse
joekaiser profile image
Joe

No, I think he was confused. Look at the docs for skipSelf. I read them as: if you have a dependency defined in the main module and submodule, it allows you to tell angular which one to use.

However, if a dependency is only in the app module, you don't need to sorry about it.

angular.io/api/core/SkipSelf

Collapse
bartosz_io profile image
Bartosz Pietrucha Author

Andrei, no! I was missing important point! Please take a look at my previous comment, where I gave an explanation. Forgive me for misleading you! 😥 I will update the article!