1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    AngularJS 1.2.x Routing Changes: ngRoute

    In AngularJS 1.2.x routing has changed. It is now required that you explicitly import ngRoute in your applications! This lesson uses an older version of AngularJS that pre-dates this change.

    Load the ngRoute library
    html<script src="angular.js">
    <script src="angular-route.js">
    Import the ngRoute module
    javascriptangular.module('app', ['ngRoute']);

    Scroll down to view the full corrected code for this lesson.

    resolve $routeChangeError

    angularjsAngularJS

    We can intercept a route change error and direct the user to an appropriate page.