Reputation: 131
How to double the width of first column (from col-xx-4 to col-xx-8) with AngularJS?
It's quite easy with Bootstrap itself (you'll see it in attached plunker Section B).
I try to do the same in section A - with AngularJS.
When I use $first selector with
ng-class='{"post col-xs-8":$first}'
all columns except first one are ok. Unfortunately, first column gets class col-xx-4, not the col-xx-12 and it takes only 1/4 of free space, not full width.
How to select it and change this to look like in section B? http://plnkr.co/edit/PvkjyDg19oM3bQaqJWIK?p=preview
Upvotes: 2
Views: 819
Reputation: 1377
This is what you need:
<div ng-repeat="a in data" ng-class='{"post col-xs-8":$first, "col-xs-4":!$first}'>
<p class="color">{{a}}</p>
</div>
The parent divs of all the child divs were missed to set width, except the first column.
Upvotes: 2