angular-selectize icon indicating copy to clipboard operation
angular-selectize copied to clipboard

ng-show and ng-hide not working in <selectize> element

Open krnlde opened this issue 10 years ago • 1 comments

I experienced this when conditionally disabling/enabling the selectize element with Angular's ng-show and ng-hide directives. It is only working when wrapping the whole thing with a dummy div. See my code for reference:

<!-- Not working -->
<selectize ng-show="availableTags.length > 0" config='selectizeOptions' options="availableTags" ng-model="tags" ></selectize>

<!-- working -->
<div ng-show="availableTags.length > 0">
  <selectize config='selectizeOptions' options="availableTags" ng-model="tags" ></selectize>
</div>

krnlde avatar Nov 23 '15 09:11 krnlde

I want to point out that the desired behaviour can be simulated with the ng-ifdirective:

<selectize ng-if="availableTags.length > 0" config='selectizeOptions' options="availableTags" ng-model="tags" ></selectize>

krnlde avatar Nov 24 '15 14:11 krnlde