JSFiddle - React, Tailwind, and code Playground
by Douglas Duhaime
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<div class="dropdown-selector-container" data-ng-controller="MyCtrl">
<select class="dropdown-select" data-ng-options="option.sectionId as option.label for option in dropdownOptions" data-ng-model="selectedSection" data-ng-change="setDropdownOption()">
</select>
</div>
JavaScript
var app = angular.module("myApp", []);
function MyCtrl($scope) {
$scope.dropdownOptions = [{
'label': 'ok',
'sectionId': '1',
}, {
'label': 'wow',
'sectionId': '2',
}];
$scope.setDropdownOption = function() {
console.log($scope);
};
};