demo/demo.js
function MainCtrl($scope, $location) {

    $scope.select = function select(id) {
      $scope.selected = $scope.selected === id ? null : id;
      $location.path('/' + id);
    };

    $scope.examples = examples;
    $scope.select($location.path().substring(1) || examples[0].id);

  }
function MainCtrl($scope, $location) {

    $scope.select = function select(id) {
      $scope.selected = $scope.selected === id ? null : id;
      $location.path('/' + id);
    };

    $scope.examples = examples;
    $scope.select($location.path().substring(1) || examples[0].id);

  }
function MainCtrl ( $scope , $location ) { $scope . select = function select ( id ) { $scope . selected = $scope . selected === id ? null : id ; $location . path ( '/' + id ) ; } ; $scope . examples = examples ; $scope . select ( $location . path ( ) . substring ( 1 ) || examples [ 0 ] . id ) ; }
Controls the example navigation
Controls the example navigation