Angular不适用于safari浏览器

时间:2017-05-24 15:55:52

标签: angular safari

现在我想在safari浏览器上运行angular2页面。

但它无法正常工作。 (它适用于chrome)。

所以我试图在StackOverflow上搜索分辨率,它说的是polyfill,core-js,es6-shim。

但我不知道如何使用它们。

我根据https://angular.io/docs/ts/latest/guide/browser-support.html

在index.html中包含了shim.min.js

但浏览器控制台显示如下。

  

获取http://localhost/frontend/node_modules/core-js/client/shim.min.js 404(未找到)

我尝试在文件polyfills.ts中导入'intl'。 但结果是一样的。

这是我的错误日志

Failed to load resource: the server responded with a status of 404 (Not Found)
http://10.70.1.6/frontend/D:/Work/Project/FrontEnd/src/polyfills.js.map

Failed to load resource: the server responded with a status of 404 (Not Found)
http://10.70.1.6/frontend/Observable.js.map

[Error] ERROR – TypeError: undefined is not an object (evaluating 'me.selected_group[0]') — main.bundle.js:3177
    error
    View_AdminSchedulesEditexistingComponent_3
    logError (vendor.bundle.js:17953)
    (anonymous function)
    handleError (vendor.bundle.js:5973)
    tick (vendor.bundle.js:9889)
    (anonymous function) (vendor.bundle.js:9762:111)
    invoke (polyfills.bundle.js:10900)
    onInvoke (vendor.bundle.js:8957)
    invoke (polyfills.bundle.js:10899)
    run (polyfills.bundle.js:10660)
    run (vendor.bundle.js:8825)
    next (vendor.bundle.js:9762:86)
    (anonymous function) (vendor.bundle.js:8659)
    __tryOrUnsub (vendor.bundle.js:19278)
    next (vendor.bundle.js:19225)
    _next (vendor.bundle.js:19165)
    next (vendor.bundle.js:19129)
    next (vendor.bundle.js:19491)
    emit (vendor.bundle.js:8645)
    checkStable (vendor.bundle.js:8922)
    onLeave (vendor.bundle.js:8998)
    onInvokeTask (vendor.bundle.js:8951)
    invokeTask (polyfills.bundle.js:10932)
    runTask (polyfills.bundle.js:10700)
    invoke (polyfills.bundle.js:10995)
[Error] ERROR CONTEXT – DebugContext_ {view: Object, nodeIndex: 3, nodeDef: Object, …}
    error
    View_AdminSchedulesEditexistingComponent_3
    logError (vendor.bundle.js:17953)
    (anonymous function)
    handleError (vendor.bundle.js:5978)
    tick (vendor.bundle.js:9889)
    (anonymous function) (vendor.bundle.js:9762:111)
    invoke (polyfills.bundle.js:10900)
    onInvoke (vendor.bundle.js:8957)
    invoke (polyfills.bundle.js:10899)
    run (polyfills.bundle.js:10660)
    run (vendor.bundle.js:8825)
    next (vendor.bundle.js:9762:86)
    (anonymous function) (vendor.bundle.js:8659)
    __tryOrUnsub (vendor.bundle.js:19278)
    next (vendor.bundle.js:19225)
    _next (vendor.bundle.js:19165)
    next (vendor.bundle.js:19129)
    next (vendor.bundle.js:19491)
    emit (vendor.bundle.js:8645)
    checkStable (vendor.bundle.js:8922)
    onLeave (vendor.bundle.js:8998)
    onInvokeTask (vendor.bundle.js:8951)
    invokeTask (polyfills.bundle.js:10932)
    runTask (polyfills.bundle.js:10700)
    invoke (polyfills.bundle.js:10995)

我该如何解决这个问题?我该怎么办?

1 个答案:

答案 0 :(得分:0)

如果您使用的是CLI,请查看polyfills.ts文件。取消注释导入并安装那里提到的包。

相关问题