[SOLVED] router.clearPreviousPages() - Not working

it never works!

app.views.main.router.clearPreviousPages();

VM8357:67 Uncaught TypeError: app.views.main.router.clearPreviousPages is not a function
at HTMLElement. (:67:42)

pageInit: function(e, page) {
var self = this;
$('.badge-pro-add').on('click', function(e) {

app.views.main.router.clearPreviousPages();
// or
app.router.clearPreviousPages();
self.router.clearPreviousPages();
        });
},

ΠŸΠΎΠΊΠ°ΠΆΠΈΡ‚Π΅ ΠΊΠΎΠ΄, Π³Π΄Π΅ Ρƒ вас инициализируСтся view.

1 Like

`
mainView.router.clearPreviousPages(); -> this is not working !

mainView.router.clearPreviousHistory(); -> this is working !

 var app = new Framework7({       
        root: '#app',
        theme: theme,  
        view: {
            iosDynamicNavbar: false,
            xhrCache: false,
        },
        routes: routes,
    });

    var mainView = app.views.main;
    mainView.router.navigate('/home/');

Π’ΡƒΡ‚ Π½Π΅Ρ‚ ΠΊΠΎΠ΄Π° ΠΈΠ½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ view.
clearPreviousPages доступСн с 3.6.0
clearPreviousHistory доступСн с 2.0.10

thank you. Δ°t is work