UNPKG

pages

Version:

AngularJS / Node.js sidekick.

37 lines (20 loc) 833 B
angular.module('APPNAME.setup', []).factory 'appSetup', [ '$q', '$timeout', ($q, $timeout) -> currentScope = undefined ### Public API ### service = The `app.js` file is generated, and `app.run` instantiates `appSetup` for any logic which need to imparted. initApp: (scope) -> #### FOR YOUR MODIFICATION #### #### / FOR YOUR MODIFICATION #### Pre-loaded data and application logic which needs to happen before loading a majority of pages. While we can manipulate page `scope`, we can't instantiate any new objects here. initPage: (scope) -> defer = $q.defer() currentScope = scope #### FOR YOUR MODIFICATION #### #### / FOR YOUR MODIFICATION #### $timeout (() -> defer.resolve() ), 2 * 1000 defer.promise ]