Closed pranjal-goswami closed 8 years ago
Hi @pranjal-goswami, thank you for using the directive and for openning an issue.
You must use the attributes: placeholder-text-multiple
and placeholder-text-single
instead.
Please check the example
<select class="" chosen="{width:'100%'}" multiple placeholder-text-multiple="'Recepients'"
ng-model="recepients" ng-options="contact as contact.name for contact in contactBook">
</select>
Hi @leocaseiro, thank you for your response. I tried using the suggested attribute but it did not work. I have made this jsFiddle for your perusal
Hi @pranjal-goswami, I'm sorry, I actually forgot to mention that both placeholder-text-multiple
and placeholder-text-single
are expecting a bindable value, so you must use a string value or a variable:
<select class="" chosen="{width:'100%'}" multiple placeholder-text-multiple="'Recepients'"
ng-model="recepients" ng-options="contact as contact.name for contact in contactBook">
</select>
Or dynamic:
$scope.label = 'Recepients';
<select class="" chosen="{width:'100%'}" multiple placeholder-text-multiple="label"
ng-model="recepients" ng-options="contact as contact.name for contact in contactBook">
</select>
jsfiddle updated with both examples: https://jsfiddle.net/9d8n4zsf/
Thanks a lot!
Chosen version : 1.6.1 angular-chosen : 1.4.0
<select class="" chosen="{width:'100%'}" multiple data-placeholder="Recepients" ng-model="recepients">
The 'data-placeholder' attribute works fine as long as ng-options is not added
<select class="" chosen="{width:'100%'}" multiple data-placeholder="Recepients" ng-model="recepients" ng-options="contact as contact.name for contact in contactBook">