Hello and Thank You for looking at my problem. I am new to angularjs hence give me as much coaching as you would think I need.
I have 2 pages. (1) - singlepage.php (this one is really the main container for every other page (2) - login.html (this one is really a fragment containing text boxes for username, password etc
<!-- fragment from singlepage.php -->
<body ng-controller="AppController" class="{{bodyClass}}">
<div id="view" ng-view></div>
</body>
$routeProvider.when('/login', {
templateUrl: 'templates/login.html',
bodyclass: 'login',
controller: 'LoginController'
});
app.controller("LoginController", function($scope, $location, AuthenticationService, $route) {
$scope.bodyclass = 'login';
$scope.credentials = { email: "", password: "" };
$scope.login = function() {
AuthenticationService.login($scope.credentials).success(function() {
$location.path('/home');
});
};
});
I need the class on body element to change to say "loginbox" when the login page loads.
Thanks Again