如何在JSP页面中包含angular2/4组件? [英] How to include angular2/4 component in JSP page?

查看:79
本文介绍了如何在JSP页面中包含angular2/4组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在JSP页面中添加角度分量,可能的方法是什么?

I want to add angular component into JSP page, what are the possible ways ?

要描述更多:

我在JSP中有一个应用程序动态Web应用程序,而我创建的另一个应用程序是一个进行身份验证的有角度的组件. 除了对象,嵌入式或iframe,是否可以在JSP Web应用程序中使用此组件?

I have one application dynamic web application in JSP and another I created is an angular component which does some authentication. Is there way to use this component in JSP web application, apart from object,embedd or iframe ?

推荐答案

我能够通过使用以下命令构建角度组件来实现此目的的另一种方法:

Another way I was able to do it, by building the angular component with command:

ng build 

这将生成JavaScript文件,该文件将在您的angular项目的dist文件夹中创建.

This will generate JavaScript files will be created in dist folder of your angular project.

然后仅将dist文件夹中的文件包含到您的JSP应用程序中,并直接使用angular组件.

Then just include the files from the dist folder into your JSP application and use angular component directly.

这篇关于如何在JSP页面中包含angular2/4组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆