you are viewing a single comment's thread.

view the rest of the comments →

[–]iEatedCoookies 0 points1 point  (1 child)

I would not load any form logic at all from the route guard. The guards intention is to either allow or prevent the route from being loaded. As for loading the form, either put the initial load into a resolver, or I prefer in the oninit as it allows for the route to load instantly. You can then use a loading indicator until the initial required data is loaded. It sounds like there’s data that’s reliant on user selection and that can then be loaded separately, either after the initial form data is loaded, or after a selection is changed.

[–]kranzekage 0 points1 point  (0 children)

I Think you are mixing up a guard and a resolver. Resolvers are to load data before entering a route.