How to use "applicationWillTerminate" in Ionic

I have found this function from Apple’s iphone’s blog.
They referred to use this method when you wish to do something on application terminate.
So I have looking for its equivalent method in IONIC 2

I think the equivalent in Cordova would be something like this: