JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-controller="SIController">
<select id="current-command" ng-model="currentCommand"
 ng-options="c as c.label for c in availableCommands track by c.id"></select>
<button ng-click="changeSelectedOption()">Select something</button>
</div>

JavaScript

var myApp = angular.module('myApp', []);

function SIController($scope) {

	$scope.availableCommands = [
        {id: 'edit', 		label: 'Edit'},
        {id: 'open', 		label: 'Open'},
        {id: 'close', 		label: 'Close'}
	];
	
	$scope.currentCommand = "close";
	$scope.editCommand = function() {
        $scope.currentCommand = 'open';
        alert($scope.currentCommand);
	};
	
};