angularjs - Angular ui-grid: define columns in template -


the ui-grid documentation tells define columns in controller, this:

$scope.gridoptions = {     columndefs: [         { field: 'id', displayname: 'ref', width: "60" },         { field: 'title', displayname: 'title', width: "200" }     ] } 

while works fine, feel belongs in template. there way setup columns this:

<div ui-grid="gridoptions" class="mygrid" style="width:800px; height: 600px">     <ui-column field="id" width="60">ref</ui-column>     <ui-column field="title" width="200">title</ui-column> </div> 


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -