我有一个 AngularJS 移动网站,它在 iPhone 5、iPhone 5s(均运行 iOS 8)和我的 iPad(也运行 iOS 8)上运行良好。但是,“登录”按钮在 iPhone 6 上不起作用(例如,您单击它但没有任何反应)。完全相同的网站在其他 iOS 移动平台上运行完全没有问题。这对我来说没有意义,因为它们都是 iOS 8?
附带说明一下,该网站确实可以通过 Browser Stack 在 iPhone 6 模拟器上运行,但不能在实体 iPhone 6 上运行。我不确定这是否是 iPhone 6 上的默认设置,但我找不到任何东西.
这是点击登录按钮时调用的代码:
标记的代码片段是:
<div class="col-sm-6 bordered-form field-padding">
<form name="loginForm" role="form" novalidate>
<div class="row">
<div class="col-sm-12">
<h4>Existing employers login</h4>
</div>
</div>
<div class="row">
<div class="col-sm-12 form-group">
<input type="email" name="email" ng-model="user.email" placeholder="Please enter your email address" class="validatedInputField" required>
<span ng-show="loginForm.email.$valid" class="glyphicon glyphicon-ok icon-success"></span>
<span ng-show="loginForm.email.$invalid && loginForm.email.$dirty" class="glyphicon glyphicon-remove icon-invalid"></span>
</div>
</div>
<div class="row">
<div class="col-sm-12 form-group">
<input type="password" name="password" ng-model="user.password" placeholder="Please enter your Password" class="validatedInputField" required ng-minlength="6">
<span ng-show="loginForm.password.$valid" class="glyphicon glyphicon-ok icon-success"></span>
<span ng-show="loginForm.password.$invalid && loginForm.password.$dirty" class="glyphicon glyphicon-remove icon-invalid"></span>
</div>
<div class="col-sm-12">
<button class="btn btn-success" ng-disabled="loginForm.$invalid" ng-click="authenticate()"><span class="glyphicon glyphicon-thumbs-up"></span> Login</button>
</div>
</div>
</form>
</div>
Angular 函数在这里:
$scope.authenticate = function(){
var credentials = "Basic " + $window.btoa( this.user.email + ":" + this.user.password );
$http.get( ENV.apiEndpoint + '/auth/basic/',
{headers: {'Authorization': credentials}})
.success( function(data, status, headers, config){
AuthorisationService.LoginUser(data);
}).
error( function(data, status, headers, config) {
ErrorLoggingService.logError( data, status, headers, config );
});
}
Angular 版本:1.2.15
Bootstrap 版本:~3.0.3
有人在 iPhone 6 上遇到过这个问题吗?
由于我无法使用实体 iPhone 6,因此我在确定问题时遇到了一些问题。如果有人可以使用 iPhone 6,我可以让他们访问我网站上的测试帐户,他们可以非常快速地重现问题。
如有任何帮助,我们将不胜感激。
最佳答案
我在出现问题的实际 iPhone 6 上对此进行了调试,当服务器返回的 token 存储在 session 存储中时,我发现它失败了。
我调用 Apple 支持,并与他们通了很多时间。该页面适用于其他 iPhone 6 设备,但不适用于此设备。在尝试了几种不同的设置并确认它可以在 Chrome 上运行后,出色的 Apple 支持人员让我看看该页面是否设置为“私有(private)”。
在 Safari 浏览器的右下角,您可以单击一个图标,然后可以将各个网站设置为“私有(private)”。取消选中它会使网站正常运行,我可以将 token 存储在 session 存储中。看来我的客户不小心将网站设置为“私有(private)”,这导致了问题。
希望这能为遇到类似问题的其他人节省一些时间。完全感谢 Apple 支持人员花了一个多小时解决了这个问题。
关于ios - AngularJS Web App 在 iPhone 6 上停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27099409/
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳
关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭8年前。Improvethisquestion在首页我有:汽车:VolvoSaabMercedesAudistatic_pages_spec.rb中的测试代码:it"shouldhavetherightselect"dovisithome_pathit{shouldhave_select('cars',:options=>['volvo','saab','mercedes','audi'])}end响应是rspec./spec/request
在Rails4.0.2中,我使用s3_direct_upload和aws-sdkgems直接为s3存储桶上传文件。在开发环境中它工作正常,但在生产环境中它会抛出如下错误,ActionView::Template::Error(noimplicitconversionofnilintoString)在View中,create_cv_url,:id=>"s3_uploader",:key=>"cv_uploads/{unique_id}/${filename}",:key_starts_with=>"cv_uploads/",:callback_param=>"cv[direct_uplo
这里有一个很好的答案解释了如何在Ruby中下载文件而不将其加载到内存中:https://stackoverflow.com/a/29743394/4852737require'open-uri'download=open('http://example.com/image.png')IO.copy_stream(download,'~/image.png')我如何验证下载文件的IO.copy_stream调用是否真的成功——这意味着下载的文件与我打算下载的文件完全相同,而不是下载一半的损坏文件?documentation说IO.copy_stream返回它复制的字节数,但是当我还没有下
我正在尝试解析一个文本文件,该文件每行包含可变数量的单词和数字,如下所示:foo4.500bar3.001.33foobar如何读取由空格而不是换行符分隔的文件?有什么方法可以设置File("file.txt").foreach方法以使用空格而不是换行符作为分隔符? 最佳答案 接受的答案将slurp文件,这可能是大文本文件的问题。更好的解决方案是IO.foreach.它是惯用的,将按字符流式传输文件:File.foreach(filename,""){|string|putsstring}包含“thisisanexample”结果的
使用Ruby1.9.2运行IDE提示说需要gemruby-debug-base19x并提供安装它。但是,在尝试安装它时会显示消息Failedtoinstallgems.Followinggemswerenotinstalled:C:/ProgramFiles(x86)/JetBrains/RubyMine3.2.4/rb/gems/ruby-debug-base19x-0.11.30.pre2.gem:Errorinstallingruby-debug-base19x-0.11.30.pre2.gem:The'linecache19'nativegemrequiresinstall
1.错误信息:Errorresponsefromdaemon:Gethttps://registry-1.docker.io/v2/:net/http:requestcanceledwhilewaitingforconnection(Client.Timeoutexceededwhileawaitingheaders)或者:Errorresponsefromdaemon:Gethttps://registry-1.docker.io/v2/:net/http:TLShandshaketimeout2.报错原因:docker使用的镜像网址默认为国外,下载容易超时,需要修改成国内镜像地址(首先阿里
我知道全局变量$!包含最新的异常对象,但我对下面的语法感到困惑。谁能帮助我理解以下语法?rescue$! 最佳答案 此构造可防止异常停止您的程序并使堆栈跟踪冒泡。它还会将该异常作为值返回,这很有用。a=get_me_datarescue$!在此行之后,a将保存请求的数据或异常。然后您可以分析该异常并采取相应措施。defget_me_dataraise'Nodataforyou'enda=get_me_datarescue$!puts"Executioncarrieson"pa#>>Executioncarrieson#>>#更现实的