-
-
Save MarJaysonSanAgustin/01199a1ba8261d8cf2ed27f162064bd5 to your computer and use it in GitHub Desktop.
Accessing the body tag of the angular app and toggling the class using angular 4 attribute directives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// since the <body> tag is inside the index.php and doesn't have any component.ts | |
<a alphaToggleNav class="sidebar-toggle" data-toggle="offcanvas" role="button"> | |
// the alphaToggleNav directive will find the body tag, and will change the className depending on the state. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment