状態に問題があります(どのように動作するのかわかりません)。イオン状態が作動しない
[OK]を私のapp.jsコードビューこの:
....
app.config(function($stateProvider, $urlRouterProvider, $ionicConfigProvider) {
// $ionicConfigProvider.views.transition('none');
$stateProvider
.state('app', {
url: '/app',
templateUrl: 'tpl/home.html',
controller: 'AppController',
abstract: true
})
.state('app.aquarium', {
url: '/aquarium/index',
views: {
'menuContent': {
templateUrl: 'tpl/aquarium/index.html',
controller: 'AquariumIndexCtrl',
}
}
})
....
$urlRouterProvider.otherwise('/app/aquarium/index');
....
app.controller('AppController', function($scope) {
console.log("App");
});
app.controller('AquariumIndexCtrl', function($scope) {
console.log("Akwaria");
});
....
と、私はこれまでのhrefを持っているのindex.htmlに述べている:
<a class="item item-icon-left" href="#/app/aquarium/index">
<i class="icon"><img src="img/aquarium.png" /></i>
Aq
</a>
しかし、すべての時間が、私は状態からファイルを参照してください " app "(tpl/home.html)。
なぜ私のリンクは、作品をいけないと起動アプリに私は
$urlRouterProvider.otherwise('/app/aquarium/index');
に「リダイレクト」を使用したときに、なぜまだTPL/home.htmlファイルを読み込みますか?ありがとう:)