I\'m using Angular 2 Material sidenav in my project this way:
Pass the object to your function.
Close
import {Component} from '@angular/core'; @Component({ selector: 'my-app', templateUrl: './app.component.html' }) export class AppComponent { constructor() { } randomName(start: any) { start.toggle(); } }