我刚开始使用Ionic App,我遇到了SideMenu
组件的问题。
这是我现在的代码:
索引:
<body ng-app="starter">
<ion-nav-view></ion-nav-view>
</body>
菜单:
<ion-side-menus>
<ion-side-menu side="left">
<header class="bar bar-header bar-stable">
<h1 class="title">Menu</h1>
</header>
<ion-content class="has-header">
<ion-list>
<ion-item nav-clear menu-close href="#/menu/categories">
Categories
</ion-item>
<ion-item nav-clear menu-close href="#/menu/another">
Another
</ion-item>
</ion-list>
</ion-content>
</ion-side-menu>
<ion-pane ion-side-menu-content>
<ion-nav-bar class="bar-stable">
<ion-nav-back-button class="button-clear"><i class="icon ion-chevron-left"></i> Back</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view name="menuContent" animation="slide-left-right"></ion-nav-view>
<ion-nav-buttons side="right">
<button menu-toggle="right" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
</ion-pane>
</ion-side-menus>
子视图:
<ion-view>
<ion-nav-title>Categories></ion-nav-title> <!-- nothing shows -->
<ion-nav-buttons side="left"><!-- nothing shows -->
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
<ion-content class="has-header">
...
</ion-content>
</ion-view>
除了“子”视图的标题和nav-buttons
之外,一切正常。我阅读了文档并找到了一些示例,上面的代码看起来很不错。
任何帮助都将不胜感激。