I'm working on a web app. It's backended by Spring from controllers to database. Currently I handle page navigation using get methods from the Spring MVC controllers to access the pages.
I'm planning to use angular JS to do my UI work. I've looked up examples on how to do it and it's all good but I'm not sure about something...
ng-app
1- Should I use one per app or one per page or it doesn't matter?
2- If it doesn't matter when should I decide?
I see examples using it on the html tag and some others using in divs but I'm not sure how to decide that maybe due a lack of understanding about the framework.
No, never use app per page, angular takes time to bootstrap whole app, and with server rounting it even doesn't make sense of writing ng application, here's interesting question about that, and it will be quite hard to maintain each application separately
Separate each logic into it's own module, but still have single starter/bootstrapper
It matters
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With