Closed oiacrasec closed 7 years ago
After search throught the code just pass the attribute:
placeholder="Your Placeholder" labels="vm.labels"
Controller:
vm.labels = {
'itemsSelected': 'text you want',
'search': 'Search...'
};
If my project contains 3 drop downs and I want to have a different button text instead of "Select" for each of them. How can I do it?
I think the easiest way is create 3 variable labels like:
<multiselect id="sel2-{{ $index }}" ng-model="conta.rateio.racas"
placeholder="Selecione"
labels="vm.labels" <<<<<<<<<<<<< **HERE**
options="vm.racas" class="child"
id-prop="id" display-prop="nome" show-search="true"></multiselect>
vm.labels = {
'itemsSelected': 'opções',
'search': 'Pesquisar...'
};
You can create a vm.labels base only with the value for itemsSelected and extend in another variable the search value, like:
vm.labels2 = angular.extend(destination_object, source)
More details: https://docs.angularjs.org/api/ng/function/angular.extend
And to finish, just pass to your second multselect the vm.labels2
You can use the labels attribute: https://bentorfs.github.io/angular-bootstrap-multiselect/#example-labels
Hello, how can i easily change the button text to something i want?