I am by setting the display type of a dashboard and came across this problem, how to make a if else in angular.
Is there a better way to do this?
<div ng-if="'CONFIG.dashboard.rows == 1'" layout="column" flex>
<div ng-if="'CONFIG.dashboard.rows > 1'" layout="row" flex>
RESOLVED:
<div ng-switch on="CONFIG.dashboard.rows" flex>
<div ng-switch-when="1" layout="column" flex layout-wrap>
<div ng-repeat="wdg in CONFIG.widgets" flex='100' ng-include="wdg.template"></div>
</div>
<div ng-switch-default layout="row" flex layout-wrap>
<div ng-repeat="wdg in CONFIG.widgets" flex='50' ng-include="wdg.template"></div>
</div>
</div>