M
M
Maxim Fedorov2021-06-09 17:22:12
Angular
Maxim Fedorov, 2021-06-09 17:22:12

How to display a notification when clicking on a closed route through AuthGuad?

There is AuthGuard, which honestly checks access to the route
There is a (open) link to a specific route
If you click and there is no access, then nothing happens, I want to display a notification, but I can’t do it in the guard (it just gives a bool)

Question: how When you click on a closed route (well, a link with a route), display a notification?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2021-06-09
@Maksclub

In the guard, inject the notification service and pull the method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question