https://angular.love/angular-facade-pattern #337
Replies: 2 comments 4 replies
-
The article theoretical part is fine but actual example is wrong that facade doesn't make much sense. AuthService - should only be responsible for authentication. Meaning if you want to ensure user is authenticated the you use route guard instead. In conjunction with AuthGuard one would normally use Global 401 error interceptor to log user out automatically. UserDetails - should be resolved at the router level once AuthGuard resolved as true. This means your example doesn't have real use case. I would advise creating a much more realistic use case instead. I often see over-engineering in Angular while overlooking simple solutions/tools that Angular offer. |
Beta Was this translation helpful? Give feedback.
-
Interesting contents, Thanks @mateusz :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://angular.love/angular-facade-pattern
Angular.love - a place for all Angular enthusiasts created to inspire and educate.
https://angular.love/angular-facade-pattern
Beta Was this translation helpful? Give feedback.
All reactions