<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-rc.0/angular.js"></script>
<div ng-app="demoApp" ng-controller="MainController as mainCtrl">
<h3>{{order.product.name}} ($ {{order.product.costPerItem}})</h3>
<div>
<label>Quantity</label>
<select class="form-control"
ng-model="order.quantity"
ng-options="quantity for quantity in allowedQuantities"
>
<!--
loop over allowedQuantities, and for each element, assign a
variable called quantity (to use later), and then display
quantity (type number). angularJS compares 'for quantity' with
order.quantity. this works because angular is comparing a number.
-->
</select>
</div>
<div>
<label>Shipping Method</label>
<select class="form-control"
ng-model="order.shipment"
ng-options="shipment.name for shipment in shipmentMethods">
<!-- a
ngularJS is doing a simple comparison on objects. needs different handling.
-->
</select>
</div>
<div>
<h3>Total Cost: </h3>
${{calculateTotalCost(order)}}
</div>
</div>