backbone.js - Backbone not to add a route to history -


i have route want able navigate in series. unfortunately backbone doesn't make possible navigate same route twice.

is possible not save route history?

i have route:

app_router.on('route:deletefile', function(filename){         var r=confirm("do want delete "+filename);         if (r==true)           {            //delete instruction           }     }); 

if don't accept confirm mistake, can't choose same file delete again. because route reached.

one solution consist of navigating previous route when don't accept confirm, without triggering :

app_router.on('route:deletefile', function(filename){     var r=confirm("do want delete "+filename);     if (r==true)       {        //delete instruction       }     else       {         backbone.history.navigate(/* previous rout */, {trigger: false});       } }); 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -