Closed stefensuhat closed 8 years ago
Hi, I tried to reset the selected value like this:
<ol class="nya-bs-select show-menu-arrow btn-white" ng-model="user" data-live-search="true" data-size="6" data-title="Choose Users"> <li nya-bs-option="value in users" data-value="value.id"> <a>{{value.name}}</a> </li> </ol>
Controller:
$scope.users = ['and', 'bcde', 'fgh']; $scope.reset = () => { $scope.user = {}; };
But the selected value cannot be reset. Is there any proper way to reset the value back to default (title)?
reset $scope.user to null or undefined
null
undefined
@lordfriend works perfect thanks
Hi, I tried to reset the selected value like this:
Controller:
But the selected value cannot be reset. Is there any proper way to reset the value back to default (title)?