@enjin/ionic1
Version:
A comprehensive build system for Ionic 1 apps by Madness Labs as part of the Madness Enjin
29 lines (25 loc) • 731 B
text/typescript
/// <reference path="../typings/index.d.ts"/>
module <%= app %> {
'use strict';
class AppRunner {
constructor(
$rootScope,
enjin,
$state,
$ionicLoading,
Platform
) {
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState) {
$state.previous = fromState;
});
$rootScope.$on('loading:show', function() {
$ionicLoading.show();
});
$rootScope.$on('loading:hide', function() {
$ionicLoading.hide();
});
Platform.run();
}
}
angular.module('<%= app %>').run(AppRunner);
}