AngularJS UI路由器登录身份验证 - AngularJS ui-router login authentication

问题:

I am new to AngularJS, and I am a little confused of how I can use angular-"ui-router" in the following scenario: 我是AngularJS的新手,在以下情况下我对如何使用angular-“ ui-router”感到有些困惑:

I am building a web application which consists of two sections. 我正在构建一个包含两个部分的Web应用程序。 The first section is the homepage with its login and signup views, and the second section is the dashboard (after successful login). 第一部分是带有登录和注册视图的主页,第二部分是仪表板(成功登录后)。

I have created an index.html for the home section with its angular app and ui-router config to handle /login and /signup views, and there is another file dashboard.html for the dashboard section with its app and ui-router config to handle many sub views. 我已经使用它的角度应用程序和ui-router配置为home部分创建了一个index.html来处理/login/signup视图,并且对于它的app和ui-router配置来了dashboard部分的另一个文件dashboard.html处理许多子视图。

Now I finished the dashboard section and don't know how to combine the two sections with their different angular apps. 现在,我完成了仪表板部分,并且不知道如何将这两个部分与不同的角度应用程序结合起来。 How could I tell the home app to redirect to the dashboard app? 我如何告诉家用应用程序重定向到仪表板应用程序?


解决方案:

参考一: https://stackoom.com/question/1WYz1
参考二: AngularJS ui-router login authentication
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章