Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Can you select different components according to async data? #166

Open
@hrajchert

Description

@hrajchert

The idea is the following: Say I have a route /myresource/991, I would like to be able to ask the backend for the data of that resource, and depending on the response I would show one component or another.

In the ui-router I try to implement this using the resolve mechanism in conjunction with templateFactory and controllerProvider to dynamically select a "component". But there is a that the provider doesn't wait for the resolves angular-ui/ui-router#330.

In the new angular router I dont see resolve but I see a canActivate, will this mechanism be able to say what component to activate? Or how would you handle this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions