I need to contruct the following
<button large></button>
<button larger></button>
I would like to do something like...
<!-- where items = ["large", "larger"] -->
<button ng-repeat="item in items" {{item.type}}>Whatever</button>
How would I go about this? I tried the above but it didn't seem to work
I would expect...
<button large class="ng-binding">Whatever</button>
<button larger class="ng-binding">Whatever</button>
but I get
<button {{item.type}} class="ng-binding">Whatever</button>
<button {{item.type}} class="ng-binding">Whatever</button>
As you can see the button fails to have the appropriate attr.
ng-attr
(ng-attr-custtype="{{item.type}}" will setcusttype="large" etc
) or You could even setng-class
. What are you achieving by doing<button large
etc..? sorry this makes no sense to me... If you really want you would need to create a directive which sets attribute on the element