angular-deferred-bootstrap
angular-deferred-bootstrap copied to clipboard
Discussion: Why do you defer bootstrap?
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!
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)
We use it to load list of feature flags to feed into https://github.com/mjt01/angular-feature-flags
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!
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).
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.
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.
It's a great tool for loading language files and user data before the rest of the page gets loaded. :+1: