Within my Angular project, I am currently relying on an asynchronous function called foo(): Promise<boolean>
. Depending on the result of this function, I need to decide whether to display component Foo
or Bar
.
Considering my specific need, what would be the most effective method to achieve this? I don't believe that route guards would be suitable for this particular scenario.