I have some code snippets in Angular, including the following:
<body class="ftb2">
// a lot of code here
</body>
And within the Angular controller, I have the following:
var bodyTemp = $document[0].body;
bodyTemp.removeClass("ftb2");
The code successfully gets the 'bodyTemp' but is not removing the class. The Chrome debugger shows:
bodyTemp: body.ftb2
aLink: ""
I'm unsure of the reason for this behavior.
PS: My Angular scope is defined inside a div within the body and cannot be changed. Therefore, my code looks like this:
<body class="ftb2">
<!-- angular bootstrapped with this id-->
<div id="xyz">
</div>
</body>
Bootstrap code:
var root = document.getElementById("xyz");
angular.bootstrap(root, ["appInvest"])