Created
August 4, 2017 14:11
-
-
Save 2n2n/9c7d11e2b4905dd8431f7f6a9cfac977 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