我正在为移动设备建立一个网站,它使用angular-file-upload.min.js从移动设备图像库上传图像.
HTML代码:
<div>
<div class="rating-camera-icon">
<input type="file" accept="image/*" name="file" ng-file-
select="onFileSelect($files)">
</div>
<img ng-show="fileName" ng-src="server/{{fileName}}" width="40"
style="margin-left:10px">
</div>
Run Code Online (Sandbox Code Playgroud)
码:
$scope.onFileSelect = function($files) {
for (var i = 0; i < $files.length; i++) {
var file = $files[i];
if (!file.type.match(/image.*/)) {
// this file is not an image.
};
$scope.upload = $upload.upload({
url: BASE_URL + 'upload.php',
data: {myObj: $scope.myModelObj},
file: file
}).progress(function(evt) {
// console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total));
// $scope.fileProgress = evt.loaded / evt.total * 100.0;
}).success(function(data, …Run Code Online (Sandbox Code Playgroud) 我有这个HTML:
<header class="bar-title"> <a class="button-prev" onclick="history.back(-1)">back</a>
<h1 class="title">Page</h1>
</header>
<div style="overflow:auto;-webkit-overflow-scrolling:touch; height: 100%; width: 100%; padding-top: 42px;">
<iframe style="height: 100%; width: 100%;" src="url"></iframe>
</div>
Run Code Online (Sandbox Code Playgroud)
将iframe被向下滚动/顶部和左/右,但是当我滚动在某个时候跳转到页面顶部.
我正在使用这个网络编辑器示例:
这使您可以看到样式的输入标记
text-align: right;
Run Code Online (Sandbox Code Playgroud)
在iPhone和nexus上,占位符在右侧正确显示,但在所有三星Galaxy设备上它位于左侧.
有人知道原因吗?或者如何解决这个问题?
我用phonegap编写了一个应用程序.
我有一个从服务器收到的电话号码列表.当单击列表中的项目时,控制器会对此功能进行分类:
$scope.call = function(number){
document.location.href = 'tel:' + number;
}
Run Code Online (Sandbox Code Playgroud)
在iPhone上没关系,但在Android上我得到:
unsafe:tel:+97235726333
Run Code Online (Sandbox Code Playgroud)
为什么?它是utf-8编码的问题吗?
我在移动应用上有这个HTML:
<header class="bar-title">
<a class="button-prev" onclick="history.back(-1)">
BACK
</a>
<h1 class="title">FACEBOOK</h1>
</header>
<div style="overflow:auto;-webkit-overflow-scrolling:touch; height: 100%; width: 100%; padding-top: 42px;" >
<iframe style="height: 100%; width: 100%;" src="https://www.facebook.com/pages/SOMEPAGE" ></iframe>
</div>
Run Code Online (Sandbox Code Playgroud)
但我得到错误:拒绝在一个框架中显示" https://www.facebook.com/pages/SOMEPAGE ",因为它将"X-Frame-Options"设置为"DENY"
小评论:我没有访问Facebook页面选项
单击时我有一个按钮我执行此功能:
$scope.sendPolicy = function(){
// make server request and called this call back:
navigator.notification.alert(
"message",
function(){
$state.transitionTo('main', {
Id: $scope.Id
});
},
'title',
'confirm');
Run Code Online (Sandbox Code Playgroud)
弹出警报确定,但单击确认按钮时,警报会消失,就是这样.没有其他事情发生(应该触发向主屏幕的过渡.)在警报被解除后,如果再次点击导致警报弹出的按钮,视图/页面传输正在被触发,我们回到主要页面,以及警报再次弹出.
问题是:
cordova ×5
html ×4
javascript ×4
jquery ×4
angularjs ×3
android ×1
compression ×1
css ×1
facebook ×1
file-upload ×1
html5 ×1