javascript - Cleaner way to bind angular vm to table -


i'm creating table , repeating each item in viewmodel , looking cleaner way write this.

<div class="row">     <div class="col-lg-4" ng-repeat="x in vm.visibleoptions">         <table>             <tr>                 <td colspan="2">                     option <span ng-bind="x.optionnumber"></span> - <span ng-bind="x.optionname"></span>                 </td>             </tr>         </table>     </div> </div> 

any advice helpful dove head first angular new project.

cleaner pretty subjective, if can more concisely with:

<div class="row">     <div class="col-lg-4" ng-repeat="x in vm.visibleoptions">         <table>             <tr>                 <td colspan="2">                     option {{x.optionnumber}} - {{x.optionname}}                 </td>             </tr>         </table>     </div> </div> 

then add css ng-cloak index.html file.

<style>         [ng\:cloak],         [ng-cloak],         [data-ng-cloak],         [x-ng-cloak],         .ng-cloak,         .x-ng-cloak {             display: none !important;         }     </style> 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -