Previously we are using canv2 whereas we have recently updated our application to canv3 so i am looking a way to redirect a user to another page after he click a button.
For example in canv2 in our click function we used:
route.data.assign({
‘section’:‘merchandizing’,
‘page’:‘customers’,
‘action’: ‘edit’,
‘id’:id
});
but I am looking a way in v3, I have check can-route-pushstate it is open a page but the issue is its maintaining history and also URL in the browser does not change even it redirect to a new page
I have tried following examples but that didn’t work
route.replaceStateOnce(‘section’, ‘page’,‘action’);
route.attr( { section: “xxxxxxx”, page: ‘xxxxx’,action:‘create’ });
route.data.set({section: ‘merchandizing’,page:‘customers’,action:‘create’});
I am looking for similar way - history.pushState(’’,’’, ‘/’ + ‘xxxxxx’ + ‘/’ + ‘xxxxxxx’ + ‘/’ + ‘create’);