DEV Community

Meyti
Meyti

Posted on

2

Handle page unload event in nativescript-vue

import { Page } from 'tns-core-modules/ui/page'
export default {
  mounted () {
    this.nativeView.page.on(Page.navigatingFromEvent, this.pageUnload)
  },
  beforeDestory () {
    this.nativeView.page.off(Page.navigatingFromEvent, this.pageUnload)
  },
  methods: {
    pageUnload () {
      console.log('page unload')
    }
  }
}

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more