Ionic controller not called after $state.go Ionic controller not called after $state.go angularjs angularjs

Ionic controller not called after $state.go


I had a similar problem. The first time was shown only after reload. The reason is view caching. Disable it with cache: false, like in my specific case:

$stateProvider  .state('login', {    url: '/login',    controller: 'LoginCtrl as vm',    templateUrl: 'app/login/login.html'  })  .state('tab', {    url: '/tab',    abstract: true,    templateUrl: 'templates/tabs.html',    cache: false  })


This is due to view caching, which can be disabled in a variety of ways. See http://ionicframework.com/docs/nightly/api/directive/ionNavView/ for more details.