Angular 6项目可以在Chrome中正常运行,但不能在IE11中运行

时间:2019-02-14 15:04:20

标签: angular internet-explorer-11 compatibility

我的Angular 6 / Visual studio.net框架4.6.2应用程序在Chrome中显示正常,但在IE 11中未显示。 [IE 11 compatibility errors using Angular 5  取消注释,并按建议安装了npm。

也按照: [Angular 2 / 4 / 5 not working in IE11 添加

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
 <script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>

位于src下的index.html和位于Home下的index.cshtml中。

当我在IE中执行“检查元素”时,进入控制台:

SCRIPT1010: Expected identifier
File: vendor.js, Line: 174472, Column: 9

vendor.js from lines 174466 - 174474 gives:

// Unless required  by  applicable  law  or  agreed  to  in  writing,  software 
// distributed under the License is distributed on an "AS  IS"  BASIS,  WITHOUT
// WARRANTIES OR CONDITIONS  OF  ANY  KIND, either express or implied.  See the 
// License for the specific  language  governing  permissions  and  limitations 
// under the License.
     Object.defineProperty(exports, "__esModule", { value: true });
174472 - >function* Forward(target) {
    yield* target;
  }

请指导该怎么做?

P.S。 这是我的tsconfig.json:

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

0 个答案:

没有答案