title: TypeScript example of AngularJS $routeProvider module
body: <p>I am currently working up a simple couchapp that uses AngularJS and have decided to use TypeScript </p>
  
  <p>I am basing it off of the AngularJS angular-phonecat tutorial.  I have most of the application converted to idiomatic TypeScript.  I have based this off of the pwalat / Piotr.Productlist bits<a href="https://bitbucket.org/pwalat/piotr.productlist" rel="nofollow noreferrer">1</a>, however they only cover Controllers and Models.</p>
  
  <p>I am struggling to figure out how to create the correct TypeScript equivalent for the angular router <code>$routeProvider</code></p>
  
  <pre><code>    //app/js/app.js[2]
  
      angular.module('phonecat', []).
        config(['$routeProvider', function($routeProvider) {
        $routeProvider.
            when('/phones', {templateUrl: 'partials/phone-list.html',   controller: PhoneListCtrl}).
            when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}).
            otherwise({redirectTo: '/phones'});
      }]);
  </code></pre>
  
  <p>I know it needs to be a <code>module {}</code> of some sort?</p>