Hi,
I have tabs:
...
$stateProvider
// setup an abstract state for the tabs directive
.state('tab', {
url: "/tab",
abstract: true,
templateUrl: "templates/tabs.html"
})
// the home tab has its own child nav-view and history
.state('tab.home-index', {
url: '/home',
views: {
'home-tab': {
templateUrl: 'templates/home-index.html',
controller: 'HomeIndexCtrl'
}
}
})
.state('tab.calculator', {
url: '/info',
views: {
'info-tab': {
templateUrl: 'templates/info.html'
}
}
})
...
in controllers:
...
.controller('HomeIndexCtrl', function($scope, $ionicLoading, $timeout, $http) {
$scope.init = function() {
//something get data from remote with $http
}
$scope.init();
});
...
then, when I go to the “Info” tab and then back to “Home” runs init (), but I wish not to run init ().
Please I need help.