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

Discussion: Why do you defer bootstrap?

Open sabrehagen opened this issue 10 years ago • 7 comments

Would love to hear from users the purposes for which they need to defer bootstrapping so that we can all learn about all the great ways it can be used to improve application experience. Hope a discussion is okay here - would be a great knowledge sharing technique!

sabrehagen avatar May 05 '15 11:05 sabrehagen

We use it for a couple purposes. Namely getting application configuration settings from a json file on the server it's hosted on (multiple server environment) and also getting "terms" from a service based on query parameters that get passed to the login screen (mutli-tenant)

jpmckearin avatar Jul 16 '15 21:07 jpmckearin

We use it to load list of feature flags to feed into https://github.com/mjt01/angular-feature-flags

parxier avatar Aug 21 '15 01:08 parxier

I would say that it goes in line with e.g the twelve factor app methodology. It lets us have environment agnostic builds of our Angular app and we can fast and easily update the config json files on the machines without redeploying the whole app. Really nice!

biggestT avatar Oct 09 '15 15:10 biggestT

Loading configuration, or session data from the server (could be language). For example I answered this question which is I think the problem we're trying to solve: http://stackoverflow.com/questions/31859035/angularjs-how-to-stay-in-run-method-until-it-finishes/31859360#31859360

I think this is part of a broader problem that Angular 1 doesn't provide a way to have deffered dependencies (and async modules).

RodolpheGohard avatar Oct 20 '15 14:10 RodolpheGohard

We ended up going back to rendering our config into a page as JS variable server side and reading it in angular's run() method due to this bug #38.

parxier avatar Oct 20 '15 20:10 parxier

Hi, I just find out this project,

haven't tried yet but it looks like what I wanted. My main use-case : load translations data, and check session still valid.

It looks really great, I hope I will be able to try this very soon.

Thanks for your work.

no-more avatar Nov 09 '15 17:11 no-more

It's a great tool for loading language files and user data before the rest of the page gets loaded. :+1:

ssc-hrep3 avatar Nov 09 '15 18:11 ssc-hrep3