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.

    The config function

    angularjsAngularJS

    This episode explains the config phase of an AngularJS application and how is it special in regards to $routeProvider (routing configuration) and providers in general.