【发布时间】:2017-10-25 02:04:24
【问题描述】:
现在我想在 safari 浏览器上运行我的 angular2 页面。
但它不能正常工作。 (它在 chrome 上运行良好)。
所以我尝试在 StackOverflow 上搜索分辨率,它说有关 polyfill、core-js、es6-shim。
但我不知道如何使用它们。
我根据https://angular.io/docs/ts/latest/guide/browser-support.html在index.html中包含了shim.min.js
但是浏览器控制台显示如下。
GET http://localhost/frontend/node_modules/core-js/client/shim.min.js404(未找到)
我已经尝试在文件 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)
我该如何解决这个问题?我能做什么?
【问题讨论】: