machineboy2045 / angular-selectize

angular-selectize
MIT License
201 stars 115 forks source link

ng-show is not working #85

Closed phanhongphucit closed 9 years ago

phanhongphucit commented 9 years ago

As the title described

PhiLhoSoft commented 9 years ago

Indeed, it just adds a ng-hide class on the selectize tag, but it just adds display: none which is already on the tag... I suppose the directive should watch this attribute and react accordingly.

Workaround: use ng-if. Not exactly the same thing, but might be useful in some cases. Since Angular removes the selectize component from the Dom, it effectively removes also the associated elements.

Uelb commented 9 years ago

Same issue here... Thank you for the ng-if workaround

mohitjee15 commented 9 years ago

@PhiLhoSoft please close the issue if it resolved.

PhiLhoSoft commented 9 years ago

@mohitjee15 I cannot: I haven't created the issue, and I have no control over the project. Beside, the issue is not resolved. Support for ngShow can be added to the control, can be useful.

machineboy2045 commented 9 years ago

@PhiLhoSoft another solution might be to add a template to the directive, that would wrap a div around the div that Selectize gets applied to. What do you think?