AngularJS - Route to another page of different ng-app module after login

后端 未结 3 1709
春和景丽
春和景丽 2020-12-17 15:29

I have a basic knowledge of AngularJS only. I have created one AngularJS application.

index.html has two links for login and register. With ng-view. By default, logi

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-17 15:48

    As I know only one ng-app can be used per html document and same is true for the ng-view also. The idea I would suggest you to use $routeProvider to navigate between pages in the application.

    Use services to have the login information of the user and also have ng-show/ng-hide to show them particular pages based upon their login state.

提交回复
热议问题