1)メインページ、親ビューに表示されないからオプションで選択したiがログインページにリダイレクトするルータの設定を使用してデフォルトでのindex.html
2)、 - テンプレート/ login.htmlと
ホームページでテンプレート/ landing.html
4)、私はハンバーガーのアイコンをクリックすると、私はオプション
5でsidemenuを取得 - 3)ログインページから、ログインが成功した場合、私はsidemenuでホームページにリダイレクトされます)しかし、私はsidemenuのオプションをクリックすると、たとえば "updateProfile" テンプレート/ updateProfile.html、私はホームページで対応するupdateProfileページを見ることができません
1のイオン - sidemenuが
私は設定を変更しようとしましたが、何も進んでいません。親切に私を助けてください。
以下は私のコードです。
index.htmlを
<body ng-app="myapp">
<ion-nav-view></ion-nav-view>
</body>
テンプレート/ login.htmlと
<ion-view view-title="Sign in">
<ion-nav-bar class="bar-stable">
</ion-nav-bar>
<ion-content>
<input type="text" placeholder="@handle" ng-model="userName" />
<button class="button button-block button-positive" ng-click="signIn()">Sign in</button>
</ion-content>
</ion-view>
app.js
app.controller('LoginController',function($scope,$state){
$state.go('landing');
};
});
app.config(function($stateProvider,$urlRouterProvider){
$stateProvider.state('login',{
url : '/',
templateUrl : 'template/login.html',
controller : 'LoginController',
cache : false
});
$stateProvider.state('landing',{
url : '/landing',
templateUrl : 'template/landing.html',
controller : 'LandingController'
}).state('landing.updateProfile', {
url: "/updateProfile",
views: {
'menuContent' : {
templateUrl: "template/updateProfile.html"
}
}
});
$urlRouterProvider.otherwise('/');
});
テンプレート/ landing.html
<ion-view view-title="Landing">
<ion-nav-bar class="bar-stable">
</ion-nav-bar>
<ion-side-menus>
<ion-side-menu-content>
<ion-nav-bar class="bar-stable">
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon button-clear ion-navicon"></button>
</ion-nav-buttons>
<ion-nav-back-button></ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view name="menuContent"></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-header-bar class="bar-stable"><h4>Do your thing</h4></ion-header-bar>
<ion-content>
<ion-list>
<ion-item menu-close href="#/updateProfile">Update Profile</ion-item>
<ion-item menu-close href="#/yourDishes">Your Events</ion-item>
</ion-list>
</ion-content>
</ion-side-menu>
</ion-side-menus>
</ion-view>
テンプレート/ updateProfile.html
<ion-view view-title="Update Profile">
<ion-content>
update profile
</ion-content>
</ion-view>