Why are routes useful? Instead of filling a single view with more code than needed, routes let us map URLs to self-contained controllers and templates. Furthermore, now that the app has URLs, users can easily bookmark and share the app's pages.

What can we generalize so far?

  • Directives are a way to make standalone UI components, like <app-info>
  • Services are a way to make standalone communication logic, like forecast which fetches weather data from a server
  • Routes are a way to manage apps containing more views.
Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.