教程第十五讲的ion-nav-view问题
我用例程的demo,发现将<div ui-view></div>置换成<ion-nav-view></ion-nav-view>后,页面显示有问题,不知是什么问题。求大神指点一下。<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
<script src="ionic.bundle.min.js"></script>
<link rel="stylesheet" type="text/css" href="ionic.min.css">
</head>
<body ng-controller="firstCtrl">
<a class="button" ui-sref="map">map</a>
<a class="button" ui-sref="music">music</a>
<a class="button" ui-sref="class">class</a>
<!--<div ui-view></div>-->
<ion-nav-view></ion-nav-view>
<script type="text/ng-template" id="class.html">
Content of the template.classclassclass
</script>
</body>
<script type="text/javascript">
var app = angular.module("myApp", ["ionic"]);
app.config(function($stateProvider) {
$stateProvider
.state("map", {
templateUrl: "map.html"
})
.state("music", {
templateUrl: "music.html"
}) .state("class", {
templateUrl: "class.html"
});
}).controller('firstCtrl',function($scope,$state){
$state.go('class');
});
</script>
</html>
继续往后学吧,基础教程看完就会了 同学你好,请问可以发一下你说的教程的网址吗?谢谢! DaSaB 发表于 2016-2-3 17:53
同学你好,请问可以发一下你说的教程的网址吗?谢谢!
http://www.ionic.wang/course-index.html
页:
[1]