I am using AngularJS 1.05
I'd like to have something like this:
In my controller:
$scope.location = $location.path().split('/')[2]
$scope.lang = $routeParams.lang
$scope.bodyClassName = ((if $scope.location isnt "login" then "sub" else ""))
I'd like to report these variables in an document object to get for example:
<div class="home en sub"></div>
I tried with
<div class="{{location}} {{lang}} {{bodyClassName}}"></div>
It works on the first load but not when the view get refresh.
As the documentation says, ng-class is made to evaluate expressions, but I need to print a variable.
What is the good way for that?