0

I am using angularjs 1.4

I would like to have 2 web pages for my web application. 1 web page for log-in and another web page for the main app. If user logs in correctly, he will be re-directed to the web page for the main app.

I am not sure which is a better design for angularjs. Should I use 1 ng-app for one webpage or should I use the same ng-app for the 2 web pages? Which approach is better for angularjs? Or doesn't matter?

guagay_wk
  • 26,337
  • 54
  • 186
  • 295

2 Answers2

1

I don't think there is a right or wrong answer here.

In my opinion:

  1. If I have a large application that has a couple of large components - then I like splitting them up into separate applications.

  2. If you have a small application with 2 pages then I guess this should be in the same single page application.

  3. If you have a master page and you don't want any reloads or glitches - then this must be in one single page application.

Amir Popovich
  • 29,350
  • 9
  • 53
  • 99
1

Depend on your architecture, if you want to have each web page on two diferent servers then the answer is yes better two diferents apps in the other hand if both apps are in the same server, domain etc then only one app is going to work well.