JSFiddle - React, Tailwind, and code Playground
by Anik Islam Abhi
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<div ng-app="myApp">
<div data-ng-controller="myCtrl">
<select ng-model="sell.stock.id" class="col-md-5" ng-change="calibreChanged()" ng-options="currentStock.id as currentStock.calibre for currentStock in stocks">
</select>
{{sell.stock}}
</div>
</div>
JavaScript
var myApp = angular.module('myApp', []);
myApp.controller('myCtrl', function($scope) {
$scope.stocks=[{
id : 1,
calibre : 'a'
},{
id : 2,
calibre : 'b'
}];
$scope.sell = {
stock : {}
};
$scope.calibreChanged = function() {
var stock = $scope.sell.stock;
}
})