2

I have individual pages and initially I wanted to use angularJS because of data binding and the many other neat features. I also ended up using requireJS simply to help me manage my dependancies better as the list of javascript libraries I'm using is growing.

My question is using AngularJS with requireJS a no no for non single page web apps?

1 Answer 1

5

It's not a no-no. You can definitely use angular on non-single page apps. You just will lose a lot of the functionality - ie the stuff between "pages". You app will essentially be recreated on every page.

I've used angular for a multi-page site (basically a product search engine), with each page being separate. I used GET and POST to transfer stuff across pages, but ultimately, I wanted to use angular for rendering the content on the page because it's just neat and clean.

Sign up to request clarification or add additional context in comments.

3 Comments

I only mentioned this question because I was told by someone else on here that I was in for a "world of hurt" so I wanted to get others take on this because I would re-run modules on each page load.
nah. I've successfully used it for UI only and the code from my previous jquery-only+server-side version has decreased dramatically.
I have also noticed that a lot of my code has reduced too because I dont have to pick out element tags as much. Requirejs and Angular also helps me structure my code better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.