angularjs - Creating a tile dashboard using angular js -


i creating dashboard application in angular js, have different tiles. each tile has own specific data & html.

thought of approaching problem

<div ng-repeat="tile in tiles"> <dashboard-tile/> </div> 

where directive. have following doubts- 1. since each tile have different html(content), how can repeat through single directive template. 2. if want inherit base tile , add own properties (model+content) tile, how can repeat tile in html.

not sure how proceed or design solution.

any appreciated.

thanks & regards, sonny

based on you're looking for, i'd you'd want ng-repeat ng-switch, , list out possible widgets ng-switch-when.

            <div class="widget"  ng-repeat="item in items" ng-switch="item.type">                  <widget-activity-feed ng-switch-when="activity" >                 </widget-activity-feed>                 <widget-monthly-income ng-switch-when="income">                 </widget-monthly-income>              </div> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -