Vote count:
0
I need to add the class homePage to the HTML document when I'm on the home page of my site.
I'm using AngularJS, and not sure how to add a conditional class to the HTML element itself.
<html> <-- I need to add a class here. ng-class won't work since it's outside of the app.
<head>
...
bunch of required stuff
...
</head>
<body>
<main ng-app="myApp" class="myApp">
<div class="viewContainer" ng-view>
</div>
</main>
</body>
</html>
asked 2 mins ago
Add a class to HTML document in AngularJS app
Aucun commentaire:
Enregistrer un commentaire