1

각도 5의 IE11에 며칠 동안 문제가 있습니다. IE에 대한 메타 태그를각도 5 (IE11) 오류 : 약속되지 않음 : 오류 : 어떤 경로와도 일치 할 수 없음

import 'core-js/es6/symbol'; 
import 'core-js/es6/object'; 
import 'core-js/es7/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'; 

및 설정 : 나는 polyfills 켠 내가를 제공 NG 으로 프로젝트를 시작할 때

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 

모두가 노력하고 있습니다. 하지만 --prod 옵션을 사용하여 프로젝트를 빌드하면 IE11에서 앱이 작동하지 않습니다. Firefox와 Chrome이 잘 작동합니다.

콘솔 로그 : 나는 그것을 디버깅 할 때

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'gui/account' 
    Error: Cannot match any routes. URL Segment: 'gui/account' 
     at Anonymous function (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:401190) 
     at e.prototype.error (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:386643) 
     at e.prototype._error (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:7955) 
     at e.prototype.error (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:7661) 
     at e.prototype._error (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:7955) 
     at e.prototype.error (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:7661) 
     at e.prototype._error (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:7955) 
     at e.prototype.error (http://localhost:8080/gui/main.d12ff1833b14b6308efb.bundle.js:1:7661) 
     at e.prototype._error (http://localhost:8080/gui/main.d12ff1833 

SCRIPT5011: Can't execute code from a freed script 
File: polyfills.6460c1711c3b9abc371d.bundle.js, Line: 1, Column: 69035 

, 나는 polyfills.bundle.js에 약간의 오류가 발생합니다 :

IE11 debug screenshot

이 도와 주셔서 많이 감사합니다.

+0

같은 문제가 뿌리를 내린 것처럼 보입니다. https://stackoverflow.com/questions/83132/what-causes-the-error-cant-execute-code-from-a-freed-script – ToddB

+0

가능한 원인은 무엇입니까? "코드에서 실행할 수 없습니다. 해제 된 스크립트 "] (https://stackoverflow.com/questions/83132/what-causes-the-error-cant-execute-code-from-a-freed-script) – ToddB

답변

0

이 문제의 원인을 마침내 발견했습니다. 나는 봄 응용 프로그램에서 각도 응용 프로그램을 제공하고 있었다 webapp/gui 폴더. 이 라우터는 이상한 행동 원인과 해결책은

<base href="/gui/"> 

내 각도 봄 컨트롤러 각도 index.html을에 링크 http://localhost:8080/gui/account를 리디렉션이 방법에

<base href="#/"> 

에서 index.html을에 기본 href가을 변경했다 . 그런 다음 각도 라우터가이 링크를 선택하여/account 구성 요소로 리디렉션합니다.

이것은 아마도 결함 https://github.com/angular/angular/issues/18176과 관련이 있습니다.

여러분도 도움이되기를 바랍니다.

관련 문제