Skip to content

How do we collapse with javascript/buttons programmatically? #1820

Discussion options

You must be logged in to vote

Ok, finally worked out the way to do this AND in an Angular Universal (SSR) safe way:

import {Component, ElementRef, Inject, OnInit, ViewChild} from '@angular/core';
import {UserAuthService} from '../../services/user-auth.service';
import {ModalService} from '../../services/modal.service';
import {User} from '../../models/user.model';
import {Subscription} from 'rxjs';
import {Collapse} from 'tw-elements';

@Component({
  selector: 'app-nav-bar',
  templateUrl: 'nav-bar.component.html',
  styleUrls: ['nav-bar.component.scss']
})
export class NavBarComponent implements OnInit{
  public mainMenuCollapse;
  public fabMenuCollapse;
  public mainMenuElement: ElementRef;
  public fabMenuElement: 

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Routhinator
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by juujisai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant