angular-deferred-bootstrap icon indicating copy to clipboard operation
angular-deferred-bootstrap copied to clipboard

Angular2 upgrade module

Open enjoiful opened this issue 8 years ago • 1 comments

Is it possible to use angular-deferred-bootstrap with Angular2's upgrade module?

I'm using Angular-deferred-bootstrap in my Angular1 app to resolve a dependency before angular1 bootstraps. I would like to upgrade my Angular1 app to Angular2 using "UpgradeModule", however I don't see a way to reconcile angular-deferred-bootstrap with angular-deferred-bootstrap.

Thoughts?

enjoiful avatar Mar 09 '17 23:03 enjoiful

It seems that setting a constant is no longer possible. What I have done is the following:

  1. I created an angular ConfigService

  2. I call the ConfigService service during angular bootstrapping via APP_INITIALIZER

  3. I downgrade the ConfigService

  4. I can access the service values in angularjs

  5. If you need access in the config phase than I suppose you can use a ServiceProvider or set a global in the ConfigService

jbadeau avatar May 02 '17 16:05 jbadeau