'use strict';
app.controller('homeCtrl', ['$scope', '$routeParams', '$route', 'dimensionService', function ($scope, $routeParams, $route, dimensionService) {
$scope.getDimensions = function (companyId) {
dimensionService.getDimensions(companyId)
.then(function (data) {
$scope.dimensions = data;
});
}
$scope.companyId = $routeParams.companyId;
//get the current company's entities when the page loads
$scope.getDimensions($scope.companyId);
(see full text)