import { Component } from '@angular/core' ; title @ Component ( { selector : 'sidenav-open-close-example' , templateUrl : 'sidenav-open-close-example.html' , styleUrls : [ 'sidenav-open-close-example.css' ] , } ) export class SidenavOpenCloseExample { events : string [ ] = [ ] ; opened : boolean ; shouldRun = [ /(^|\.)plnkr\.co$/ , /(^|\.)stackblitz\.io$/ ] . some ( h => h . test ( window . location . host ) ) ; }