0
我目前在我的應用程序中有其他頁面導航很好,但我添加了一個新選項卡,當我點擊它時,它只是關閉菜單而不去頁面。我無法弄清楚爲什麼......任何人都可以看到?離子Angular JS導航項目不導航
app.js:
.state('utab.history', {
url: '/history',
views: {
'utab-login': {
templateUrl: 'templates/history.html',
controller: 'HistoryCtrl'
}
}
})
控制器:
$scope.historyClick=function(){
console.log("historyClick");
$state.go('utab.history');
};
.controller('HistoryCtrl', function($scope,$state,AppServer,AppHelper,AppStorage,$http) {
alert("yo2");
})
而在導航HTML代碼:
<ion-item class="item-icon-left" nav-clear="" menu-close="" ui-sref="utab.history" ng-click="historyClick()">
<i class="icon ion-document"></i>
<h2 class="menu-text">History</h2>
</ion-item>
有什麼想法?
你的.state('utab')是什麼樣的? – Aer0