当Microsoft Edge中Angular 7的值更改时,绑定无法立即工作
在Angular 7解决方案中,我在Microsoft Edge/其他浏览器(如Opera、Chrome和Mozilla)的视图中遇到了数据绑定问题。 我的页面包含多个输入元素,如文本框、下拉列表、单选按钮、日期选择器。在controller/.ts file/中的每个输入元素上都有onValueChange触发器。这些更改会立即进行,但视图不会更新 我添加了双花括号表示法来显示视图中的当前值,但值为null/或旧值/,直到您单击下一个输入/而不是每个输入-仅日期选择器或下拉列表/。 当我尝试在其他浏览器中检查此问题时,在输入value之后会立即显示值 我曾尝试在angular官方网站上为受支持的浏览器添加多个多边形填充,但没有任何帮助 这是我的tsconfig.json和polyfills.ts:当Microsoft Edge中Angular 7的值更改时,绑定无法立即工作,angular,internet-explorer,cross-browser,microsoft-edge,angular-elements,Angular,Internet Explorer,Cross Browser,Microsoft Edge,Angular Elements,在Angular 7解决方案中,我在Microsoft Edge/其他浏览器(如Opera、Chrome和Mozilla)的视图中遇到了数据绑定问题。 我的页面包含多个输入元素,如文本框、下拉列表、单选按钮、日期选择器。在controller/.ts file/中的每个输入元素上都有onValueChange触发器。这些更改会立即进行,但视图不会更新 我添加了双花括号表示法来显示视图中的当前值,但值为null/或旧值/,直到您单击下一个输入/而不是每个输入-仅日期选择器或下拉列表/。 当我尝试在
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"importHelpers": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
/** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect';
// Used for browsers without a native support of Custom Elements
import '@webcomponents/custom-elements/custom-elements.min';
import '@ng-select/ng-select/bundles/ng-select.umd.min';
import 'web-animations-js'; // run `npm install --save web-animations-js`.
有没有办法让它在边缘工作 请尝试参考以下代码:
<input type="text" class="form-control" (input)="onSearchChange($event.target.value)"><br/>
<span>{{ name}}</span>
它在我的侧边42.17134.1.0上运行良好,如下所示:
如果仍然不起作用,您能否发布足够的代码来重现问题,如中所示。此外,您还可以检查Edge浏览器版本。请尝试参考以下代码:
<input type="text" class="form-control" (input)="onSearchChange($event.target.value)"><br/>
<span>{{ name}}</span>
它在我的侧边42.17134.1.0上运行良好,如下所示:
如果仍然不起作用,您能否发布足够的代码来重现问题,如中所示。您还可以检查Edge浏览器版本。欢迎使用Stack Overflow!请确保共享相关代码。如果可能的话,共享一个可以工作的、最少的代码片段来演示问题。欢迎使用堆栈溢出!请确保共享相关代码。如果可能的话,共享一个可以工作的、最少的代码片段来演示问题。