私は$state.go
を使ってページ(テンプレート)に行きます。
コントローラ
.controller('NavCtrl', function($scope, $location, $state) {
$scope.openDaily = function() {
$state.go('daily');
};
})
それは動作しますが、$state.otherwise
がそう言うので唯一のミリ秒か何かのためにそれはBACK '/select'
ページにリダイレクトされますよう。
app.jsこれを引き起こしている何
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('select', {
url: '/select',
templateUrl: 'templates/select.html',
controller: 'selectController'
})
.state('daily', {
url: '/daily',
templateUrl: 'templates/daily.html',
controller: 'dailyController'
});
$urlRouterProvider.otherwise('/select');
})
してください?
UPDATE
index.htmlを
<body ng-app="starter" animation="slide-left-right-ios7">
<ion-nav-view>
</ion-nav-view>
</body>
select.html
<ion-view title="Select" ng-controller="NavCtrl">
<ion-content>
<div class="list-card" ng-click="openDaily()">
<a href='#' class="item item-icon-left">
<i class="icon ion-home"></i>
Personal
</a>
</div>
</ion-content>
<div class="bar bar-footer bar-balanced">
<div class="title">Add File/Folder</div>
</div>
</ion-view>
とdaily.html(テンプレート):
<ion-view title="Select" ng-controller="NavCtrl">
</ion-view>
イオンフレームワークの使用。
アンカータグに 'ng-click =" openDaily() "'がありますか?質問 –
で 'openDaily'の使用法を追加できますか?あなたの質問を 'html'スニペットでも更新できますか? – Miqe
実行ブロックに状態変更エラーハンドラを実装し、問題の詳細を取得します。 – charlietfl