Skip to content

Instantly share code, notes, and snippets.

@joe-watkins
Created February 17, 2014 19:46
Show Gist options
  • Save joe-watkins/9057585 to your computer and use it in GitHub Desktop.
Save joe-watkins/9057585 to your computer and use it in GitHub Desktop.
A Pen by Joe Watkins.
<div ng-app="myApp">
<div ng-controller="employeeCtrl">
<div ng-repeat="employee in Employees.it">
{{employee.name}}
</div>
</div>
</div>
var myApp = angular.module('myApp', []);
myApp.factory('Employees', function() {
var Employees = {};
Employees.itDepartment = [
{
name: "Hugh Jackman",
character: "Wolverine",
abilities: ["strength"],
favorite: true
},
{
name: "Thor",
character: "Chris Hemsworth",
abilities: ["strength"],
favorite: false
}
];
return Employees;
});
function EmployeesCtrl($scope, Employees) {
$scope.Employees = Employees;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment