// file app.js ... when('/fruit', { controller: 'fruitController', templateUrl: 'views/fruit.html' }). ... // Create a collection of fruits on $scope. demoApp.controller('fruitController', function ($scope) { $scope.fruits = [ {name: "apple", isSweet: true}, {name: "tomato", isSweet: false}, {name: "strawberry", isSweet: true}, {name: "avocado", isSweet: false} ]; });