Infinite loop between JSP and webpack + AngularJS app

谁都会走 提交于 2019-12-08 09:19:30

问题


We are trying to integrate a JEE app (jsp on the frontend) with an angularJs app. The angularJS is being packaged with webpack so in the jsp we are linking the app thru a <script> tag

The application is being manually bootstrapped once the modules are already defined.

The result once the manual bootstrapping occurs is kind of an infinite loop between the jsp and the angular app. We can see the url alternating between these two:

http://localhost:8080/app/initApplication?lang=ES&TOTAL_APPROVALS=1#_
http://localhost:8080/app/initApplication?lang=ES&TOTAL_APPROVALS=1#/

Note the / at the end of the second one.

The angular app sometimes get rendered in the browser and some others don't.

We think it has something to do with what occurs with $location when manually bootstrapping an Angular app but we really don't know.

What's going on?

来源:https://stackoverflow.com/questions/29837760/infinite-loop-between-jsp-and-webpack-angularjs-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!