In my ionic 1 app, there was a general controller AppCtrl declared like this in routes.js:
$stateProvider
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html',
controller: 'AppCtrl',
...
and the code inside this app-wide controller:
angular
.module('MyApp.controllers.AppCtrl', [])
.controller('AppCtrl', [
...
//lots of code in AppCtrl
...
Now in ionic 2, where should all this app-wide logic go? In the app.component.ts file ? after this.platform.ready().then(() => {
where I already ported the code I had in the .module('MyApp.run', []).run(...
?
Thanks for your help