I want to create a piece of HTML with AngularJS based on the authentication status.
I use ng-switch
.
The issue is that I want to have multiple hits on a single condition, but AngularJS only satifies the last condition met.
The HTML listens very close, because of Bootrap with fluent layout. The span3
and span9
must be directly below row-fluid
container div, otherwise it will not float nicely. So I cannot introduce extra ng-switch
divs to it...
<div class="row-fluid" ng-switch on="user.isAuthenticated">
<div class="span3" ng-switch-when="true"><div>
<div class="span9 spade-contentwrapper" ng-switch-when="true"><div>
<div class="spade-contentwrapper" ng-switch-when="false"><div>
<div>
See my simplified fiddle.