AngularJS从应用程序重定向到应用程序后,默认页面未加载

时间:2022-01-22 11:14:20

I have 2 html files, one is index.html and another is project.html. They have their own app.js and project.js, and share the same controllers.js.

我有2个html文件,一个是index.html,另一个是project.html。他们有自己的app.js和project.js,并共享相同的controllers.js。

I defined ng-app="app" and ng-app="project" seperately, however when I login and redirect to project.html, or I logout from project to index.html, the default page sometimes is not loading. I'm using ui-router, the default state seems not triggered occasionally. Anything wrong? Thanks.

我单独定义了ng-app =“app”和ng-app =“project”,但是当我登录并重定向到project.html,或者我从项目注销到index.html时,默认页面有时没有加载。我正在使用ui-router,默认状态似乎不会偶尔触发。哪里不对了?谢谢。

Update Seems it's nothing to do with redirection. Even I just enter the url (get) again and again, it stops loading default state once in a while. If I force refresh it works again.

更新似乎与重定向无关。即使我只是一次又一次地输入url(get),它会偶尔停止加载默认状态。如果我强制刷新它再次工作。

1 个解决方案

#1


2  

Turns out it's the Chrome extension 'AngularJS Batarang' causing all these problems.

原来是Chrome扩展程序'AngularJS Batarang'造成了所有这些问题。

Do not install it.

不要安装它。

#1


2  

Turns out it's the Chrome extension 'AngularJS Batarang' causing all these problems.

原来是Chrome扩展程序'AngularJS Batarang'造成了所有这些问题。

Do not install it.

不要安装它。