Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Routing with Angular vs routing with Express

Hi all,

I am in the middle of the full-stack JavaScript track, and have a question I do not think was covered.

I know that Angular (and other client-side frameworks like Ember) can perform application routing. But now I'm learning Express can also do application routing from the server side.

So question: Where "should" application routing go: client-side, server-side, a little of each, does not matter? What kind of considerations go into decomposing the application problem into routes, and where do we implement them?

I think of a route as a "displayable page with its own scope of data". My (uninformed) preference would be to implement routing in one place, the client, and let the server be more passive. The only thing I can imagine is if targeted browsers were incapable of supporting Angular apps. What else am I missing?

Thank you all,

-- Calvin Miracle, Louisville KY

1 Answer

jason chan
jason chan
31,009 Points

express routing is for rest API

angular routing is for URL routing.