Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can a placeholder be set on the input in an ng-table?

Is there a way to set a placeholder on the <input> created in an ngTable?

As a second choice, is there another way to set an input to serve as the filter?

Changes to this would be appreciated. Thanks!

like image 367
Mark Kasson Avatar asked Nov 23 '25 01:11

Mark Kasson


1 Answers

You can edit ng-table.js

Unminify ng-table.js (ie: http://jsbeautifier.org/) and after that in line 250 you can find

<input type="text" ng-model="params.filter()[name]" ng-if="filter==\'text\'" ,class="input-filter form-control"/>

add placeholder there ie :

<input type="text" ng-model="params.filter()[name]" ng-if="filter==\'text\'" placeholder="input {{name}}",class="input-filter form-control"/>

Please see here for working demo :

http://plnkr.co/edit/q0CMCb7evmZh1sflVV5f?p=preview

like image 192
sylwester Avatar answered Nov 26 '25 07:11

sylwester



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!