2017-05-24 19 views
1

今、safariブラウザでangular2のページを実行します。サファリブラウザでAngularが機能しない

しかし、正しく動作しません。 (これはクロムでうまくいく)。

私は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に '国際' を輸入しようとしています。 しかし結果は同じです。

これは私のエラーログ

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) 

どのように私はこの問題を解決することができますか?私に何ができる?

答えて

0

CLIを使用している場合は、polyfills.tsファイルを参照してください。インポートをコメント解除し、そこに記載されているパッケージをインストールします。

+0

ご回答いただきありがとうございます。私は角型のcliを使用しています。私はpolyfill.tsがそこにあることを知っています。しかし、私はどの機能がサファリのためにインポートされているのかわかりません。 – Alex

+0

しばらく前と同様の問題がありましたが、Safariではintl import 'intl'とimport 'intl/locale-data/jsonp/en'のインポートが欠落していました。 – Ludwig

+0

import 'intl';ファイルpolyfills.tsにあります。しかし結果は同じです。 – Alex

関連する問題