title: Using HTML5 pushstate on angular.js
body: <p>I am trying to implement html5's pushstate instead of the # navigation used by Angularjs. I have tried searching google for an answer and also tried the angular irc chat room with no luck yet.</p>
  
  <p>This is my <code>controllers.js</code>:</p>
  
  <pre><code>function PhoneListCtrl($scope, $http) {
      $http.get('phones/phones.json').success(function(data) {
          $scope.phones = data;
      });
  }
  
  function PhoneDetailCtrl($scope, $routeParams) {
    $scope.phoneId = $routeParams.phoneId;
  }
  
  function greetCntr($scope, $window) {
      $scope.greet = function() {
      $("#modal").slideDown();
      }
  }
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>angular.module('phoneapp', []).
      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>