javascript - smart table no event is getting fired on setting the value through ng-model -


html

<input type="checkbox" value="" ng-model="filterprivatedoccheckbox" ng-click="dl.filterprivatedocument(filterprivatedoccheckbox, $event)"> <input st-search="target" class="input-sm form-control" type="search" ng-model="dl.documenttarget"  /> 

angularjs

 function filterprivatedocument(val, event) {     self.documenttarget = (val ? 'private' : '');  } 

when click on checkbox , set value in textbox (which hidden), problem there no event fire after setting value in text box , hence smart table not filter data.

how can solve problem in smart table ??

any appreciated !!

thanks

this code

function filterprivatedocument(val, event) {     self.documenttarget = (val ? 'private' : ''); } 

should

$scope.filterprivatedocument(val, event) {     self.documenttarget = (val ? 'private' : ''); } 

you should bind $scope property want expose html/template

because using controlleras syntax, should

dl.filterprivatedocument(val, event) {     self.documenttarget = (val ? 'private' : ''); } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -