I'm pretty sure something stupid again. I study angularjs, so I don't get full coverage, but I get there. I tried everything and really looked for everything I could find, but nothing worked.
I am trying to do ng-class = "..." in my layout file, but the expression is set in my controller, but somehow it does not appear. It is displayed when I put it in the ng-view file. I get that it only displays part of the file, but I want it to also map the ng class to ng-view. Is this possible, or is it easier to just insert a div inside a partial html file.
Simple html file
<body> <ng-view ng-class="{ 'splash': splash=='splash' }"></ng-view> </body>
My controller
angular.module('xxx.splash') .controller('IndexCtrl', function($scope, $rootScope, config) { $rootScope.splash = 'splash'; $scope.login = function(e) { alert('Soon. How soon? Very soon.'); } });
angularjs angularjs-scope
wardpeet
source share