angularjs - Creating bootstrap columns in angular ng-repeat making issue in width and alignment -


i have directive create bootstrap columns dynamically . problem directive columns width not equal statically creating bootstrap columns. e.g

<my-directive></my-directive> <div class="row">   <div  style="background:green" class="col-md-4 col-sm-4">   </div>    <div  style="background:green" class="col-md-4 col-sm-4">   </div>    <div  style="background:green" class="col-md-4 col-sm-4">   </div> </div> 

mydirectiveview.html

div class="row">   <div  style="background:red" ng-repeat="tile in tiles" ng-init="colsspan=12/configinfo.tiles.length" class="col-sm-{{colsspan}} col-xs-12 col-md-{{colsspan}}>   </div> </div> 

my problem width of directives div not equal when compare div created in static div not aligned

enter image description here

can me in ?? want both directive div , div created in html file should in same size , aligned properly.

hi can't see directive code, nut mayby

there wrong

> ng-repeat="tile in tiles" >  > ng-init="colsspan=12/configinfo.tiles.length" 

once you've got titles , after configingo.titles

please see here working solution

http://plnkr.co/edit/qopl5xydtxox17tv1xzd?p=preview


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -