[英]ion-content directive scroll div doesn't display data
我的離子應用程序中有以下非常簡單的html
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Ionic Blank Starter</h1>
</ion-header-bar>
<ion-content>
<ion-nav-view></ion-nav-view>
</ion-content>
</ion-pane>
問題是ion-content
指令使用此html包裝ion-nav-view
內容
<div class="scroll" style="-webkit-transform: translate3d(0px, 0px, 0px) scale(1);"></div>
看來,如果我刪除了translate3d
屬性,則會顯示內容,但是我必須假設有更好的方法,或者我缺少的東西。
我的模板顯示的內容非常簡單
<div>
<p>Welcome to the main screen</p>
</div>
這是我遇到的一些問題
當我將index.html更新為以下內容時,它會加載tabs.html。
<body ng-app="starter" animation="slide-left-right-ios7">
<ion-nav-view></ion-nav-view>
</body>
我已經將導航欄移動到tabs.html,以在所有頁面上顯示導航欄。
<ion-nav-bar></ion-nav-bar>
<ion-tabs class="tabs-icon-top">
<!-- Pets Tab -->
<ion-tab title="Works" icon="icon ion-home" href="#/tab/dash">
<ion-nav-view name="tab-dash"></ion-nav-view>
</ion-tab>
<!-- About Tab -->
<ion-tab title="Broken" icon="icon ion-gear-b" href="#/tab/account">
<ion-nav-view name="tab-account"></ion-nav-view>
</ion-tab>
</ion-tabs>
我認為正在發生的事情是ui-router首先加載抽象的rout html,然后轉到默認路由,因為未指定任何路由。
.state('tab', {
url: "/tab",
abstract: true,
templateUrl: "tabs.html"
})
這是您指定默認路由的地方。
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/tab/dash');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.