I am using a select box from ui-select. All is working fine, but I want to allow manually entered text and do not want to restrict the user from the values available in the
here is a solution:
HTML -
{{$select.selected}}
CONTROLLER -
$scope.getSuperheroes = function(search) { var newSupes = $scope.superheroes.slice(); if (search && newSupes.indexOf(search) === -1) { newSupes.unshift(search); } return newSupes; }
Here is the CodePen solution.