Quantcast
Viewing all articles
Browse latest Browse all 70875

Resolved, my stupidity - Document.addEventListener to the backbutton stop working?

@allpref wrote:

Last time I did test this in my app (can not remember if it was before or after the last update) was still functioning normally, but now it was making changes and when pressed simply closed the application.

the code I use is this, within the app.js:

platform.ready().then(() => {
    document.addEventListener('backbutton', () => {
        let nav = this.app.getComponent('nav');
        nav.setRoot(this.homePage);
    }, false);
});

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70875

Trending Articles