angularjs - Angular application with different Application paths? -
i have 2 applications deployed on same server.both angular based applications.
one url : http://localhost:8080/something/debug.html
the other :
http://localhost:8080/somethingelse/debug.html
i want combine these applications can have same header can router individual contents within container. best way of achieving in angular js?
if want keep them deployed in different urls, believe there's no "angular way" of doing , you'd have use iframe
. keep in mind application inside iframe
have no communication elements outside of it.
if want merge both apps single one, keep in mind angularjs allows use of 1 ng-app
directive per application, , if you, have small refactoring:
- create new angularjs module has other 2 existing ones dependencies.
- create
index.html
global layout , useng-app
directive reference newly created module. - use tool such ui-router or ngroute set routes existing applications,making sure states/urls don't collide.
if each application uses different routing library, you'll have refactor them use same one, or else there conflicts.
Comments
Post a Comment