I've just started learning the mean stack and i see that a lot of tutorials (most are pretty old) and some template projects (like mean.io) using angular for routing instead of express (about 80% angular routing and 20% express). So what i need to understand is what advantage does angular routing have over pure express routing? I was under the impression that angular would ajax in whatever it was routing to without reloading the page, but i find that is not really the case with the setup i have (which is how i've seen it done a lot of places).
*my setup:* So i have express routing all request to the index file and from there i have created routes in angular for all possible routes. each request is routed by angular to a jade template file (which i've seen called partials). *The issue*: so i thought that angular would be ajaxing in the partial with each request (giving me the benefit of not having the whole page reload) making a true single page application, but what i've found is that because express (or any other web server for that matter) is routing all request to the index file so angular can do it's thing the index file is always reloaded with each request. because of this, I feel like the ajax routing is meaningless. After all, if the index file is always reloaded on each request which in turn reloads the angular files (that's where all the js and css files are being called from) then there is no real difference between angular routing and express routing coupled with jade template includes. *The question:* Is this the way angular routing coupled with express is meant to be setup or am i doing it all wrong? -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
