Angular 动态表单在 IE 中不工作
Angular dynamic form is not working in IE
我在我们的应用程序中使用 Angular 1.6。我们有一个动态表单指令在 Internet Explorer 11 (IE-11) 中不起作用。 Html 在屏幕中加载表单组件时会阻塞屏幕,因为这些组件不是动态的created.How 我可以让它工作吗?
动态表单将无法与 IE11.It 一起正常工作,可以明确地使其与 IE 一起工作。
通过控制器 js 创建显式 html 组件。
document.createElement('ng-include');
document.createElement('ng-pluralize');
document.createElement('ng-view');
document.createElement('ng-form');
document.createElement('dynamic-form');
// Optionally these for CSS
document.createElement('ng:include');
document.createElement('ng:pluralize');
document.createElement('ng:view');
document.createElement('ng:form');
// IE doesn't always run the bootstrap on its own...
angular.element(document).ready(function () {
angular.bootstrap(document.documentElement);
});
明确地,您需要通过添加 null/undefined 检查
在未定义或为空的元素中对动态 form.js file.Bypass 元素进行一些修改
while (!angular.equals(iterElem.parent(), $document) && !angular.element(iterElem.parent()[0])== undefined || !angular.element(iterElem.parent()[0])== null) {
//logic will come here for iteration
}
我在我们的应用程序中使用 Angular 1.6。我们有一个动态表单指令在 Internet Explorer 11 (IE-11) 中不起作用。 Html 在屏幕中加载表单组件时会阻塞屏幕,因为这些组件不是动态的created.How 我可以让它工作吗?
动态表单将无法与 IE11.It 一起正常工作,可以明确地使其与 IE 一起工作。
通过控制器 js 创建显式 html 组件。
document.createElement('ng-include');
document.createElement('ng-pluralize');
document.createElement('ng-view');
document.createElement('ng-form');
document.createElement('dynamic-form');
// Optionally these for CSS
document.createElement('ng:include');
document.createElement('ng:pluralize');
document.createElement('ng:view');
document.createElement('ng:form');
// IE doesn't always run the bootstrap on its own...
angular.element(document).ready(function () {
angular.bootstrap(document.documentElement);
});
明确地,您需要通过添加 null/undefined 检查
在未定义或为空的元素中对动态 form.js file.Bypass 元素进行一些修改 while (!angular.equals(iterElem.parent(), $document) && !angular.element(iterElem.parent()[0])== undefined || !angular.element(iterElem.parent()[0])== null) {
//logic will come here for iteration
}