Skip to content

Instantly share code, notes, and snippets.

@MattForshaw
Last active December 28, 2015 23:29
Show Gist options
  • Save MattForshaw/7578795 to your computer and use it in GitHub Desktop.
Save MattForshaw/7578795 to your computer and use it in GitHub Desktop.
Agular form...
<select name="customer" ng-model="newBooking.customer" ng-options="customer as customer.name for customer in customers"></select>
controllers.js...
function BookingsCtrl($scope, $http, $timeout, Bookings, Flights, Customers) {
// Define a refresh function, that updates the data from the REST service
$scope.refresh = function() {
$scope.bookings = Bookings.query();
$scope.flights = Flights.query();
$scope.customers = Customers.query();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment