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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章