diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-02 11:15:33 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-02 11:15:33 -0400 |
| commit | 09fdcb32a4e8766c19b8f59a3eb81a244dfd940a (patch) | |
| tree | cf0439f741b9661d8d4fc6a19bf052a30d3d252c /www/js/app.js | |
| parent | c89196934f5c83b117afdc6c2061f1efe4a2c60a (diff) | |
#292 - more tweaks
Former-commit-id: eceaa8441b84e832cb910cf486e824e1652b2dd8
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/www/js/app.js b/www/js/app.js index 849365d3..27cb9b18 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -646,7 +646,10 @@ angular.module('zmApp', [ }); //------------------------------------------------------------------ - // doLogin() emits this when our auth credentials work + // broadcasted after : + // a) device is ready + // b) language loaded + // c) localforage data loaded //------------------------------------------------------------------ $rootScope.$on("init-complete", function () { @@ -654,6 +657,9 @@ angular.module('zmApp', [ $state.go("zm-portal-login"); }); + //------------------------------------------------------------------ + // doLogin() emits this when our auth credentials work + //------------------------------------------------------------------ $rootScope.$on("auth-success", function () { var contentBannerInstance = $ionicContentBanner.show({ @@ -1726,24 +1732,7 @@ angular.module('zmApp', [ }); - - // if none of the above states are matched, use this as the fallback - var defaultState = "/zm-portal-login"; - //var defaultState = "/login"; - // as it turns out I can't really inject a factory in config the normal way - - - //$urlRouterProvider.otherwise(defaultState); - - // https://github.com/angular-ui/ui-router/issues/600 - // If I start using the urlRouterProvider above and the - // first state is monitors it goes into a digest loop. - - $urlRouterProvider.otherwise(function ($injector, $location) { - var $state = $injector.get("$state"); - // we will do this after data is loaded - // $state.go("zm-portal-login"); - - }); - +// We are NOT going to default route. Routing to a view will start on + // a broadcast of "init-complete" + }); //config
\ No newline at end of file |
