简体   繁体   English

带有 Angular 6 的 Websphere 门户

[英]Websphere Portal with Angular 6

I want to create one Application using websphere Portlet with Angular 6. Can anyone please help how to proceed with that and is it possible angular 6 with Portlet.我想使用带有 Angular 6 的 websphere Portlet 创建一个应用程序。任何人都可以请帮助如何处理这个问题,是否可以使用 Portlet 使用 angular 6。

Regards, Srinivas.问候,斯里尼瓦斯。

While I have not done this, you should be able to create a script portlet/application where you can use Angular 6. You may have to do a bit of tinkering with the theme to get newer versions of js libraries if needed, but that should not be a big deal.虽然我还没有这样做,但您应该能够创建一个脚本 portlet/应用程序,您可以在其中使用 Angular 6。如果需要,您可能需要对主题进行一些修改以获得更新版本的 js 库,但这应该没什么大不了的。 Here is a link to resources that will get you started: https://developer.ibm.com/digexp/docs/docs/script-portlet/using-angular-angular-4-single-page-application-script-portlet/以下是可帮助您入门的资源链接: https : //developer.ibm.com/digexp/docs/docs/script-portlet/using-angular-angular-4-single-page-application-script-portlet/

Hope that helps.希望有帮助。

I am sure, it's too late for the answer, but it might useful for others.我敢肯定,答案为时已晚,但它可能对其他人有用。

We are able to integrate with Angular with the portal application.我们能够将 Angular 与门户应用程序集成。

1) Created new portlet. 1) 创建了新的 portlet。

2) Create a control class 2)创建控件类

3) Create Jsp, in jsp we did create an iframe and embedded angular application in an iframe. 3) 创建Jsp,在jsp 中我们确实创建了一个iframe 并在一个iframe 中嵌入了angular 应用程序。

Step1) Created a new portlet. Step1) 创建一个新的portlet。 in portlet.xml在 portlet.xml 中

<portlet>
   <portlet-name>newPortletNm</portlet-name>
   <display-name>newPortletNm</display-name>
   <portlet-class>.....</portlet-class>
   <init-param>
      <name>contextConfigLoc>
      <value>WEB-INF/context/porlet/newPortletNm.xml<value>
   <supports>....</supports>
   <supported-locale>....</supported-locale>
      ....
   <resource-bundle>com.myorg.gi.myappnm.NewPortletNmResource</resource-bundle>
   <portlet-info>
       <title>NewPortleTitle>
       <keywords>NewPortel</keywords>
   </portle-info>
</portlet>

newPortletNm.xml新建PortletNm.xml

<beans>
   <bean id="newPortletController" class="com.myorg.gi.myappnm.NewPortletController">
      <property name="session" value="true"/>
       ......
      <protperty name="formView" value="newPorlet"/>
   </bean>
   <!-- Interceptors-->
   <bean id="paraMappingIntercep" class="spring ParameterMappingInterceptor"/>
   <!--Handler mapping -->
   <bean id="porletMapping" class="spring PortletModeHandlerMapping">
      <property name="interceptors">
          <list>
              <ref bean=".....>
           </list>
       </property>
       <property name="portletModeMap">
           <map>
               <entry key="view">
                    <ref bean="newPortletController">
               </entry>
            </map>
       </property>
   </bean>
</beans>

NewPortletNmResource.properties新PortletNmResource.properties

java.portlet.title=My new application title
java.portlet.short-title=New App title
java.portlet.keywords=newPortlet

newPortlet.jsp新建Portlet.jsp

<html>
   <head>
      <title>New angular app in portlet</title>
      <meta>
      .....
   </head>
   <body>
      <iframe src="http://localhost:4200/myAngularApp"
   </body>
</html>

My angular app loaded in in iframe.我的 angular 应用程序加载到 iframe 中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM