这是我的应用state
:
$stateProvider
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/globalMenu.html',
controller: 'MenuController'
})
.state('app.home', {
url: '/home',
views: {
'menuContent': {
templateUrl: 'templates/appHome.html',
controller: 'AppHomeController'
}
}
})
});
$stateProvider
.state('signup1', {
url: '/signup1',
templateUrl: 'templates/loginPages/signup.html',
controller: 'SignupController'
});
$urlRouterProvider.otherwise('/app/home');
离子侧菜单:
<ion-side-menus enable-menu-with-back-views="false">
<ion-side-menu-content>
<ion-nav-bar class="bar-positive">
<ion-nav-back-button></ion-nav-back-button>
<ion-nav-buttons side="left">
<button class="button button-icon icon ion-android-menu" menu-toggle="left">
</button>
</ion-nav-buttons>
</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-positive">
<h1 class="title"></h1>
</ion-header-bar>
<ion-content>
<div class="list">
<a class="item item-icon-left" href="#/signup1" menu-close ng-show="!authenticated"><i class="icon ion-ios-personadd"></i>Sign up</a>
</div>
signup.html
<ion-nav-bar class="bar-positive">
<ion-nav-back-button></ion-nav-back-button>
<ion-nav-buttons side="left">
</ion-nav-bar>
<ion-view view-title="Sign up">
<ion-content>
......
后退按钮未显示在nav-bar
内。如何在这种情况下显示后退按钮。
答案 0 :(得分:0)
在signup.html中将ion-nav-bar放在ion-view标签内。它对我有用。
def get_name(request):
data = requests.get('http://127.0.0.1:8000/app_name/cities/?format=json')
data = data.json() # <-- convert the json to an object
context = RequestContext(request, {
'cities': data['check'],
})
return render_to_response('template', context)
希望它会有所帮助