我正在使用离子2的最新版本.我的代码<ion-content padding><form></form></ion-content>里面有一个文本输入.当我尝试在Android上输入内容时,整个页面会被键盘向上推.
html文件
<ion-content class="login-screen" padding>
<form (ngSubmit)="login()" novalidate>
<ion-list>
<ion-item>
<ion-label fixed>Username</ion-label>
<ion-input type="text" name="username" [(ngModel)]="username" required></ion-input>
</ion-item>
<ion-item>
<ion-label fixed>Password</ion-label>
<ion-input type="password" name="password" [(ngModel)]="password" required></ion-input>
</ion-item>
</ion-list>
<button ion-button full type="submit">Login</button>
</form>
<button ion-button clear full outline type="button" (click)="openModal()">Forgot Password?</button>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
有什么解决方案吗?
我是棱角分明的新人.我使用AngularJS来开发前端.但是在初始级别我遇到了在页面加载时闪烁一些内容的问题.
我的问题是,当我在localhost中运行我的应用程序时,有时它会在屏幕上显示数据绑定表达式,或者它在浏览器上显示一些疯狂的输出.ng-clock虽然我的问题没有解决,但我使用过(由angularjs docs建议).
我的html文件太小了,虽然闪烁,但没有做很多事情.请注意我的脚本标签位于底部.请给我一些想法,以防止AngularJS中的这个王者.
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Sample App</title>
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="styles/cover.css">
<link rel="stylesheet" href="styles/sidebar.css">
<style type="text/css"></style>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="node_modules/jquery/dist/jquery.min.js"><\/script>')
</script>
<script src="node_modules/angular/angular.min.js"></script>
</head>
<body ng-controller="mainCtrl" ng-cloak>
<div class="site-wrapper">
<div class="site-wrapper-inner">
<div class="masthead clearfix">
<div class="inner">
<div ng-include src="'views/header.html'"></div>
</div>
</div>
<div class="inner" ng-clock>
<div ng-if="hasSidebar" ng-include src="'views/sidebar.html'" …Run Code Online (Sandbox Code Playgroud)