/angularjs/

AngularJS Grid directive

2015-05-10 10:23:45

In the past I used json configuration to configure grid. Basically that looks like this:


<grid configuration='"article.grid.config.json"' model='"data"'></grid>

This solution has few advantages and few disadvantages. That is why I prepared new grid directive for my projects.


<bt-grid rows='"data"'>
<bt-column key-model='"TEST.ID"' label='"Id"'></bt-column>
<bt-column key-model='"NAME"' label='"Name"'></bt-column>
<bt-column key-model='"PERSON.DATE"' label='"Date"' renderer="&quot;{name:'date'}&quot;"></bt-column>
<bt-column key-model='"PERSON.TYPE"' label='"Type"' params:types}&quot;="" renderer="&quot;{name:'btDictionaryFormatter',"></bt-column>
<bt-column click='"someAction1"' label='"Action"' type='"action"'></bt-column>
<bt-column click='"someAction2"' label='"Action2"' type='"action"'></bt-column>
<bt-column app="" details="" key-model='"TEST.ID"' label='"Details"' params:'#="" renderer="&quot;{name:'btLink'," test.id'}&quot;=""></bt-column>
<bt-column key-model='"TEST.ID"' label='"Row"' params:{}}&quot;="" renderer="&quot;{name:'btShowRow',"></bt-column>
</bt-grid>

I still treat this as some type of test and I am sure, that this is not a final form.

GitHub