Skip to content

Instantly share code, notes, and snippets.

@benald
Last active September 19, 2019 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benald/3be21dc99c14de25c9a351cd058028d0 to your computer and use it in GitHub Desktop.
Save benald/3be21dc99c14de25c9a351cd058028d0 to your computer and use it in GitHub Desktop.
HTML:
<button type="button" class="uk-button" (click)="toggleControls()" [class.active]="show">toggle Controls</button>
TS:
// Define property in Component Class
public show = false;
// Define Toggle Function
toggleControls() {
this.show = !this.show;
console.log(this.show);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment