import { Injectable } from '@angular/core' ; import { Subject } from 'rxjs' ; const _expand$ = new Subject < string [ ] > ( ) ; const expandedTable = { } ; @ Injectable ( ) export class SideNavService { constructor ( ) { } get expand$ ( ) { return _expand$ ; } isExpanded ( hash ) { if ( expandedTable [ hash ] ) { return true ; } return false ; } setExpanded ( hash , expanded ) { expandedTable [ hash ] = expanded ; } }