0
我开始与离子框架。 我有一些问题, 我觉得我已经做了好所需的所有东西 客栈app.js离子导航视图不呈现模板
angular.module('starter', ['ionic']) .run(function ($ionicPlatform) { $ionicPlatform.ready(function() { if (window.cordova && window.cordova.plugins.Keyboard) { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); // Don't remove this line unless you know what you are doing. It stops the viewport // from snapping when text inputs are focused. Ionic handles this internally for // a much nicer keyboard experience. cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { StatusBar.styleDefault(); } }); }) .config(function ($stateProvider, $urlRouterProvider) { $stateProvider.state('home', { url: '/home', templateUrl: 'views/home.html' }).state('about', { url: '/about', templateUrl: 'views/about.html' }); $urlRouterProvider.otherwise("/home.html"); });中的index.xhtml
<body ng-app="starter">
<!--<ion-nav-bar class="bar-positive"></ion-nav-bar>-->
<ion-nav-bar class="bar-positive">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view></ion-nav-view>
在home.html的
<ion-view view-title="home">
<ion-content>
<p>
<a ui-sref="about">About</a>
</p>
</ion-content></ion-view>
当我看着萤火虫时,我可以看到答案,但ion-nav-view不会呈现在主页
01中定义的离子视图