ngOfficeUIFabric / ng-officeuifabric

Office UI Fabric (https://github.com/OfficeDev/office-ui-fabric) implementation for Angular
http://ngOfficeUiFabric.com
MIT License
321 stars 67 forks source link

ng-model does not work with uif-searchbox #338

Closed deval-github closed 8 years ago

deval-github commented 8 years ago

I have used the uif-searchbox directive in my sharepoint hosted app for filtering data displayed in the uif-table component. To filter the data on the basis of text in serach box with uif-searchbox directive we need to bind the text in ng-model. So that later a filter can be applied on that basis But uif-searchbox does not seem to support ng-model. If this is true then is there a way on how the data can be filtered without using ng-model in uif-searchbox. If possible please give an example.

andikrueger commented 8 years ago

If I understand you correctly, you’re saying that uif-searchbox does not support the attribute ngModel. That's true - uif-searachbox uses the attribute value, which binds to ng-model.

Have a look at this plnkr.

Usage:

<uif-searchbox value="value" placeholder="placeholder"></uif-searchbox>
deval-github commented 8 years ago

Hello andikrueger,

Thanks a lot for the reply. It cleared the doubt. :+1: