I am new to use AngularJS 1.4.x .
<div class="colContainer" ng-repeat="item in betNumber" ng-style="{width:{{rowWidth(item.length)}} +'px'}">
when press AddNumber ball more then 13 ,i wish width size can resize .
This is my hope
i hope can dynamic change div width size ,how to let it work fine ???
This is my hope http://plnkr.co/edit/t8bBjE?p=preview
Change your ng-style
value to
{width:rowWidth(item.length) +'px'}
. That should work.
The ng-style
directive will evaluate the whole object, which means it will use the $parse
method to evaluate the expression. So you don't have to use double curly braces.