1
我正在使用離子框架構建移動應用程序。 但是,在瀏覽器中模擬結果和生成結果與下面的圖像不同。構建離子標題和內容後丟失
我該如何解決這個問題?
http://i.stack.imgur.com/AYzQ3.png
http://i.stack.imgur.com/Bt2Cq.png
HTML
<ion-view view-title="More">
<ion-content class="has-header">
<ion-list>
<!-- Account details -->
<ion-item class="item-divider item-icon-left">
<i class="icon ion-person-stalker"></i>
Account management
</ion-item>
<!-- Show when user is already signed in -->
<ion-item ng-if="signedIn" class="item-icon-right" href="#/tab/yellow">
Change details
<i class="icon ion-chevron-right icon-accessory"></i>
</ion-item>
<ion-item ng-if="signedIn" class="item-icon-right" href="#/tab/yellow">
My listings
<i class="icon ion-chevron-right icon-accessory"></i>
</ion-item>
<ion-item ng-if="signedIn" class="item-icon-right" ng-click="signout()">
Sign out
<i class="icon ion-chevron-right icon-accessory"></i>
</ion-item>
<!-- Show when user isnt signed in -->
<ion-item ng-if="!signedIn" class="item-icon-right" href="#/tab/account/signin">
Sign in
<i class="icon ion-chevron-right icon-accessory"></i>
</ion-item>
<ion-item ng-if="!signedIn" class="item-icon-right" href="#/tab/account/signup">
Sign up
<i class="icon ion-chevron-right icon-accessory"></i>
</ion-item>
<!-- Useful tools -->
<ion-item class="item-divider item-icon-left">
<i class="icon ion-cash"></i>
Useful tools
</ion-item>
</ion-list>
</ion-content>
</ion-view>
控制器
angular.module('tekoria.controllers.account',[])
.controller('AccountCtrl', function($scope, $window, AccountService) {
$scope.signedIn = AccountService.current();
});
服務
angular.module('tekoria.services.account', [])
.factory('AccountService', function($rootScope) {
Parse.initialize("removed", "removed");
return {
current: function() {
return Parse.User.current();
}
};
});
使用標籤添加標題。 –
Hardy