2017-11-08 6 views
0

바람둥이 7에 배포되는 오래된 webapp가 있는데 각도 4로 새 섹션을 만들고 싶습니다. 일부 테스트를 수행하려면 webapps/project 폴더에 index.html이 들어있는 dist 폴더를 넣고 추가하십시오. 기존 웹 애플리케이션의 HTML 안에 iframe이는 iframe이는각도 4 webapp을 다른 webapp (jsp 스타일) 안에 통합하는 방법은 무엇입니까?

<html> 
 
<body> 
 

 
    <app-root></app-root> 
 
</body> 
 
</html>

포함하지만 아무것도 iframe을 내부 쇼입니다. 코드가 보이면 코드 만 표시됩니다.

<html> 
<body> 

    <app-root></app-root> 
</body> 
</html> 

누구나 구현 방법을 알고 계십니까?

답변

0

는 SystemJS으로이 튜토리얼을 사용할 수있는 수행합니다

<html> 
<head> 
<script type="text/javascript" src="../angularWeb/dist/inline.136b795d1580a6687eae.bundle.js"></script> 
<script type="text/javascript" src="../angularWeb/dist/polyfills.8eba0ab53b5457105d75.bundle.js"></script> 
<script type="text/javascript" src="../angularWeb/dist/vendor.091a5f9daa5d2223e9cf.bundle.js"></script> 
<script type="text/javascript" src="../angularWeb/dist/main.b235b84cde360ec37e99.bundle.js"></script> 

<link href="../angularWeb/dist/styles.f6578a3761ef80039afc.bundle.css" rel="stylesheet"/> 
</head> 
<body> 
    <app-root></app-root> 
</body> 
</html> 
: 당신이하는 index.html dist에서 폴더 안에있는 다음과 같은 모든 JS와 CSS를 가져와야합니다 웹팩와

Angular 4 in jsp with SystemJS

은 dist/index.html의 사본입니다. 그리고 각도 프로젝트의 모든 파일을 webapp 폴더 아래에 놓습니다.