Expose method from class


#1

How do we expose a method from a class

For instance expose the refreshUI method so that I can use the method from chrome console or native device

export class DetailPage {

refreshUI() {....}

}


So I can maybe call DetailPage.refreshUI from Chrome Dev console


#2

tried attach a method to window from outside of the class defination like this

(<any>window).refreshUI = function(){ }

where I can see freshUI() now globally but I’m now outside of the detailPage class and I can no longer use any variables/classes within detailpage class


#3

Nobody knows? :confused: