【发布时间】:2015-04-22 18:43:54
【问题描述】:
我无法在我的应用中容纳标题。 class="has-header" 显然已经过时,我需要帮助寻找替代方案。
谢谢。
如有其他问题,请随时更正。
index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script>
<script>
var Hours = angular.module('Hours', ['ngRoute']);
Hours.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/', {
templateUrl: '1.html',
}).
when('/dininghalls', {
templateUrl: '2.html',
}).
when('/fitnesscenters', {
templateUrl: '3.html'
}).
when('/officehours', {
templateUrl: '4.html'
}).
otherwise({
redirectTo: '/'
});
}]);
</script>
</head>
<body ng-app="Hours">
<div ng-view=""></div>
</body>
</html>
1.html:
<ion-header-bar align-title="left" class="bar-positive">
<div class="bar bar-header bar-stable">
<h1 class="title">Hours</h1>
</div>
</ion-header-bar>
<ion-content>
<a href="#/4" class="button button-block button-positive">
Hours
</a>
<a href="#/2" class="button button-block button-positive">
Halls
</a>
<a href="#/3" class="button button-block button-positive">
Fitness
</a>
</ion-content>
【问题讨论】:
-
将 class="has-header" 添加到您的容器中
-
谢谢,但我特别指出不再支持使用 class="has-header"。还有其他想法吗?
-
为什么在 ion-header-bar 中有一个 .header bar?
标签: angularjs ionic-framework web-applications angular-ui-router