URLs, Routing and Partials

The $location service in Angular.js parses the current browser URL and makes it available to your application. Changes in either the browser address bar or the $location service will be kept in sync.

Depending on the configuration, the $location service behaves differently and has different requirements for your application. We will first look into client-side routing with hashbang URLs since it is the default mode, and then later, look at the new HTML5-based routing.

Table of Contents

  1. URLs, Routing and Partials
  2. Client-Side Routing with Hashbang URLs
  3. Using Regular URLs with the HTML5 History API
  4. Using Route Location to Implement a Navigation Menu
  5. Listening on Route Changes to Implement a Login Mechanism