angular dart >> Best way to create a table:column renderer -
i'm hopping awesome community can steer me on right direction. came flash/flex/js world, , how simple define item renderer in flex. here i'm trying accomplish:
i have angular component consist of form , html table. have columns, headers, rows, etc. populating correctly using ng-repeat. want able define column "renderers", if passes me column property "renderas: 'button'" or "renderas: 'progress'" should able render entire column button, or progress bar, etc.
here i've tried far:
- ng-bind-html="getcolrenderer(column.renderas, column.value)" returns html based on 'renderas'. know, work basic html stuff, cannot append 'ng-click', or 'href' due angular's security. so, opted else.
- i semi-have solution embedding "ng-switch" inside ng-repeat. had ng-if several types of potential "renderers" opted switch. somehow seems future problems while trying display many columns or rows, fears.
- decorators - decorators, seemed bit simple button calls on click or progress bar 2 values. so, halted going path, if shinning path walk, means.
i hope out there has ran/done , can steer me on right course of action. if ng-switch or ng-if okay, i'm go.
once again, thank in advanced.
Comments
Post a Comment