Learn

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.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?