JSFiddle - React, Tailwind, and code Playground

by p0lska

HTML

<div ng-app="myApp" ng-controller="MainCtrl">
    <input type="text" ng-model="inFilter" ng-change="setOption()"></input>
    <select ng-model="selectedOpt" ng-options="opt for opt in options | filter:inFilter"></select>
    

    
    <p>Selected = {{opt}}</p>
</div>

JavaScript

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

function MainCtrl($scope) {
    $scope.options = ['a', 'b', 'c'];
    $scope.opt1 = 0;
    
    $scope.selectedOpt = $scope.options[0];
    $scope.setOption = function() {
        $scope.opt = 1;
    }
  
    
}