typescript - Customize Angular routing for multiple angular instances in the same page -


i want use angular render liferay portlets inside same page. each portlet coded separately, managed multiple angular instances running in parallel. now, have portletid1 , portletid2 inside same page, each portlet separate angular application , has separate routes. want each portlet listen hash change events separately can imagine url example: https://myportal/page#portletid1:/login;portlet2:/route2 possible let angular app on portlet 1 listen portletid1:route_of_portlet_1 , keep portlet 2 listening portletid2:route_of_portlet_2 ?

i'm using angular 2.

i don't have experience angular, angular sample project added liferay's blade samples, might either want or might simple - please validate on own.

it's copy full sample here, note magic-values used in views:

bnd.bnd declares web-contextpath: /angularjs-simple-portlet, used in view.jsp.

the portlet itself, without code, declares javax.portlet.name=angularjssimpleportlet (i've taken liberty resolve constant), referred in app.js, web-contextpath above.

i'll leave try if meets needs or if need more automatic. keep in mind js code not processed server-side. may more server-side processing if have jsps deliver js code - that's typically not people strive for.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -