I have 3 views
- Dashboard
- List
- Details
I route from dashboard --> list --> details.
When I back from details screen to list screen dashboard afterInit method is called. It sets as current page.
I am using this code to navigate from dashboard to list
$$(’#dashBoardID’).on(‘click’, function (e) {
app.views.main.router.navigate(’/list/’);
});
This code to navigate from list to details screen
$$(’#listID’).on(‘click’, function (e) {
app.views.main.router.navigate(’/details/’);
});
When I back from details to list screen using below code list init, list afterInit are called with dashboard afterInit.
$$(’#detailsBack’).on(‘click’, function (e) {
mainView.router.back();
});
But I want to only previous page to be called i.e list init and afterInit. Not dashboard afterInit.