(function(){
  var app = angular.module('ng-attendance', ['ngResource', 'ui.router']);

  app.config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise("/");

    $stateProvider
      .state('dev_list', {
        url: "/",
        templateUrl: '/static/html/dev_list.html',
        controller: 'DevListController',
        controllerAs: 'dev_list'
      })
      .state('dev_detail', {
        url: '/:id',
        templateUrl: '/static/html/dev_detail.html',
        controller: 'DevDetailController',
        controllerAs: 'dev_detail'
      });
  });

  app.factory("Developer", function($resource) {
    return $resource("/devs/:id", { id: '@id' }, {
      update: {
        method: 'PUT'
      }
    });
  });

  app.factory("Team", function($resource) {
    return $resource("/teams");
  });

  app.controller('DevListController', function(Developer){
    controller = this;
    Developer.query(function(data) {
      controller.devs = data;
    });
  });

  app.controller('DevDetailController', function($stateParams, Developer){
    console.log($stateParams);
    this.dev = Developer.get({id: $stateParams.id});
  });
})();

@@ -1049,32 +1049,38 @@
 arams, Developer
+, Team
 )%7B%0A    console.l
@@ -1077,40 +1077,38 @@
  con
-sole.log($stateParams);%0A    this
+troller = this;%0A    controller
 .dev
@@ -1144,24 +1144,95 @@
 arams.id%7D);%0A
+    Team.query(function(data) %7B%0A      controller.teams = data;%0A    %7D);%0A
   %7D);%0A%7D)();%0A

Add teams to DevDetailController