import { Injectable } from '@angular/core' ; import { SideDrawerType } from 'nativescript-telerik-ui-pro/sidedrawer/angular' ; @ Injectable ( ) export class DrawerService { public drawer : SideDrawerType ; public toggle ( force ? ) { if ( this . drawer ) { if ( typeof force !== 'undefined' ) { if ( force === false ) { this . drawer . closeDrawer ( ) ; } else { } } else { this . drawer . toggleDrawerState ( ) ; } } } }