import { Component , OnInit , OnChanges , OnDestroy } from "@angular/core" ; import { RadSideDrawer } from "nativescript-ui-sidedrawer" ; import { RouterExtensions } from "nativescript-angular/router" ; import * as app from "tns-core-modules/application" ; @ Component ( { selector : "plain-page" , templateUrl : "./plain-page.component.html" } ) export class PlainPageComponent implements OnInit , OnChanges , OnDestroy { constructor ( private routerExtensions ) { } ngOnInit ( ) { console . log ( "PlainPageComponent::ngOnInit()" ) ; } ngOnChanges ( ) { console . log ( "PlainPageComponent::ngOnChanges()" ) ; } ngOnDestroy ( ) { console . log ( "PlainPageComponent::ngOnDestroy()" ) ; } onDrawerButtonTap ( ) { const sideDrawer = < RadSideDrawer > app . getRootView ( ) ; sideDrawer . showDrawer ( ) ; } public goBack ( ) { this . routerExtensions . backToPreviousPage ( ) ; } }