D
D
Django Almighty2020-06-18 15:09:57
Angular
Django Almighty, 2020-06-18 15:09:57

Correct Redirect to 404?

Good afternoon.
There is a collection of tags in the application.
They have their own router with the /: tag parameter.
I'm in the component in ActiveRoute, parsing the incoming parameter, taking the tagName, climbing into the database, loading the info.
But! I do not want to immediately climb into the database, according to the incoming TagName parameter.

How to fix the situation? Create a path to each tag in app.routing? Then I will solve this question, but what if I have tens of thousands of tags?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Khegay, 2020-06-19
@khegay

What do you want to achieve?
If you check if the tag exists before opening the route, you can use guard to query the same database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question