Gustavo Gabriel Gustavo Gabriel - 4 months ago 19
AngularJS Question

Split an object properties in two columns

I wanna split an object properties in two columns, when I was using bootstrap I was able to do it with the clearfix class like so:

<div class="clearfix" ng-if="$index % 12 == 0"></div>

But now I am using angular material and I wanna know how do it. Below fiddle for testing and better explanation:

<div layout="column">
<span ng-repeat="(key,value) in obj">
{{key}} : {{value}}

Appreciate any help.


following will do what you want

<div layout="row" layout-wrap>
  <span flex=50 ng-repeat="(key,value) in obj">
    {{key}} : {{value}}

Always add flex to children of layout. Getting used to the layout rules/config takes a bit of time