当通过IOS中的PhoneGap 2.7.0内的InAppBrowser访问使用AngularJS 1.2.0rc1构建的我的网站时,屏幕上的ng-show闪烁的内容。PhoneGap + Angular + IOS = ng-show在屏幕上闪烁显示内容
<form method="POST" action="" name="manualEntryForm" class="form-inline">
<div ng-show="showErrors && !manualEntryForm.$valid" class="errorMsg ng-hide">
One or more of the following fields are required:
<span ng-show="manualEntryForm.month.$error.required || manualEntryForm.day.$error.required || manualEntryForm.year.$error.required" class="ng-hide">Date needs to be present</span>
...
</div>
...
</form>
如果我默认showErrors
虚假或更严格(showErrors === true
)测试不要紧,错误内容块显示,也表明相关(Date needs to be present
)实际的错误信息。
我很难以解决这个问题。我们是不是应该在ng-show中使用Angular Form Validation?为什么它只会导致IOS/Phonegap InAppBrowser出现问题?