(function (module) { module.controller('tabsCtrl', ["$scope","$http", "myService", "$ionicHistory", "$state", function ($scope,$http, myService, $ionicHistory, $state) { $scope.go = function(target) { // $ionicHistory.clearHistory(); $state.go(target); }; $scope.vm={ }; $scope.myMes = function(){ myService.myMes().then(function(result){ },function(error){ }); $scope.go("app.my") }; $scope.myIndex = function(){ myService.myIndex().then(function(result){ },function(error){ }); $scope.go("app.home") }; }]); })(angular.module('app.controllers'));