Put the call to boostrap inside the promise:

routeConfig.then((conf) => {
    bootstrap(AppComponent,[
        provideRouter(conf)
    ]);
});

On Thu, Jul 14, 2016 at 9:38 AM, 'breaddes' via AngularJS <
[email protected]> wrote:

> This is how I provide the router settings for my applications:
>
> bootstrap(AppComponent, [
>     provideRouter(routeConfig),
> ])
>
>
> The thing is, that the route config get's constructed on the fly from a
> dynamic import statement. So it is not hardcoded and I probably need to
> pass a promise to the routeProvider. Something like this:
>
>
> var routeConfig = new Promise();
>
>
> Of course this won't work, because provideRouter is expecting type
> RouterConfig. Any ideas how to solve this? How can I wait and setup a
> dynamic route config?
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Lucas Lacroix
Computer Scientist
System Technology Division, MEDITECH <http://ehr.meditech.com>
781-774-2293

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to