2017-11-08 9 views
0

私はtomcat 7にデプロイされている古いwebappを持っています。私は角4で新しいセクションを作りたいと思います。いくつかのテストをするために、index.htmlを含むdistフォルダをwebapps/projectフォルダの<base href=".">に入れ、既存のWebアプリケーションのHTML内部のiframe、iframeの角度4 webappを他のwebapp(jsp style)の中に統合する方法は?

<html> 
 
<body> 
 

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

しかし、何が含まれているが、IFRAMEの内側に表示されています。私がコードを見ているのであれば、コードだけを表示しています:

<html> 
<body> 

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

誰でも知っているのですか?このチュートリアルを使用することができますSystemJSでそれを行うには

答えて

0

:WebPACKので

Angular 4 in jsp with SystemJS

あなたは以下のように、index.htmldistの下のフォルダ内にあるすべてのJSとCSSをインポートする必要があります。

<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> 

はdist/index.htmlのコピー貼りです。角度のあるプロジェクトのすべてのファイルをwebappフォルダの下に置きます。

関連する問題