title: Routing in angular with subpages
body: <p>I have an Angular page where I <code>ng-repeat</code> through a projectlist (json).</p>
  
  <pre><code>ng-repeat="project in projects"
  </code></pre>
  
  <p>It's structured like this:</p>
  
  <pre><code>[{"number":789456,"title":"Coolest project ever","manager":"Darth Vader","image":7,"startdate":"25.1.2013","enddate":"8.7.2015","location":"Deathstar","favorited":"not"}]
  </code></pre>
  
  <p>So, I've made each <code>ng-repeat</code> have the following:</p>
  
  <pre><code>&lt;a ng-href="#/projects/{{project.number}}"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I've set up the route the following way:</p>
  
  <pre><code> .when('/projects', {
          templateUrl: '/views/projects.html',
          controller: 'ProjectController',
          controllerAs: 'pr',
          title: 'Prosjekter'
      })
  
      .when('/projects/:projectNumber', {
          templateUrl: '/views/projectdetails.html',
          controller: 'ProjectController',
          controllerAs: 'pr',
          title: 'Prosjekt'
      })
  </code></pre>
  
  <p>My controller looks like this:</p>
  
  <pre><code>var app = angular.module('app');
  
  app.controller('ProjectController', function($scope, projectList, $mdDialog, $q, $timeout, $routeParams){
  
    $scope.projectNumber = $routeParams.projectNumber;
    $scope.projects = projectList.query();
  
  
    $scope.project = $scope.projects.filter(function(project) {
          return project.number === $routeParams.projectNumber;
      })[0];
  </code></pre>
  
  <p>I get the projectlist from my factory called "projectList".</p>
  
  <p>My problem is, the view loads up correctly, but I have no way of accessing the variables of the project once I'm in this 'child-view' of projects.</p>
  
  <p>I tried using <code>{{project.number}}</code>, but it doesn't work. How would I define this in my controller?</p>