当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - Drag page content view make a blank screen on iOS 8 mobile app

问题描述:

In ionic ios app swipe the page it shows blank screen.Please help me how to fix this.

app.js

 $stateProvider.state('login',

{

cache: false,

url: '/login',

templateUrl: 'templates/Login.html',

controller: 'loginCtrl'

})

this is Login.html template page

<ion-view view-title="Login" hide-nav-bar="true" padding="true">

<ion-header-bar align-title="center" class="bar-positive">

<h1 class="title">Login</h1>

</ion-header-bar>

<ion-content scroll="true" overflow-scroll="true">

<form name="signInForm" novalidate="" ng-submit="tryLogin(signInForm)">

<div class="list-header">

<label class="item item-input" tabs-item-hide="true" ng-class="{ 'has-errors' : signInForm.Email.$invalid, 'no-errors' : signInForm.Email.$valid}">

<input type="email" placeholder="Email" name="Email" ng-model="loginData.Email" autofocus required>

</label>

<span class="form-errors" ng-show="signInForm.Email.$error && signInForm.$submitted" ng-messages="signInForm.Email.$error" ng-messages-include="templates/form-errors.html">

</span>

<label class="item item-input">

<input type="password" placeholder="Password" name="Password" ng-model="loginData.Password" required>

</label>

<span class="form-errors" ng-show="signInForm.Password.$error && signInForm.$submitted" ng-messages="signInForm.Password.$error" ng-messages-include="templates/form-errors.html">

</span>

<div>&nbsp;</div>

<p class="text_right">

<a href="#/forgotPassword">Forgot Password?</a>

</p>

<div>

<button class="button button-block button-positive">Login</button>

</div>

<div style="text-align: center">

<a href="#/SignUp">Create an account</a>

</div>

</div>

</form>

</ion-content>

My Main Page HTML:

<ion-side-menus>

<ion-side-menu-content>

<ion-nav-bar class="bar-positive">

<ion-nav-buttons side="left">

<button class="button button-icon button-clear ion-navicon" ng-click="toggleLeft()"></button>

</ion-nav-buttons>

</ion-nav-bar>

<ion-nav-view></ion-nav-view>

</ion-side-menu-content>

<ion-side-menu side="left" >

<ion-header-bar class="bar-positive">

<h1 class="title">MY App</h1>

</ion-header-bar>

<ion-content>

<ion-list>

<ion-item class="item item-icon-left" nav-clear menu-close href="#/Settings">

<i class="icon ion-gear-b"></i>Settings

</ion-item>

</ion-list>

</ion-content>

</ion-side-menu>

</ion-side-menus>

Now swipe the child page it from the iphone it show the blank screen, coldn't load it again

网友答案:

just use the following line of code in the config of your AngularJS module

angular.module(....)
.config(function($stateProvider,$urlRouterProvider,$ionicConfigProvider){
$ionicConfigProvider.views.swipeBackEnabled(false);
//remaining code in config
}
分享给朋友:
您可能感兴趣的文章:
随机阅读: