var app = angular.module('app', []); app.controller('app.inventory', ['$scope', '$filter', inventory]); function inventory($scope, $filter) { $scope.cars = [{ model: 'Altima', year: 2015, make: '1' }, { model: 'XTerra', year: 2015, make: '2' }, { model: 'Focus', year: 2015, make: '3' }]; $scope.makes = [{ id: 1, name: 'Toyota' }, { id: 2, name: 'Nissan' }, { id: 3, name: 'Ford' }]; }
<div ng-app="app"> <div ng-controller="app.inventory" class="container"> <table class="table"> <caption>Vehicle List - No look up</caption> <thead> <tr> <th>Year</th> <th>Make</th> <th>Model</th> </tr> </thead> <tbody> <tr ng-repeat="car in cars"> <td>{{car.year}}</td> <td>{{car.make}}</td> <td>{{car.model}}</td> </tr> </tbody> <tfoot> <tr> <td colspan="3"></td> </tr> </tfoot> </table> </div> </div>