JavaScript How to define and trigger Backbone route with get params?

I have the following routes:

var Workspace = Backbone.Router.extend({

  routes: {
    "": "index"
  },

  index: function() {
    ...
  }       
});

At now I can trigger this route like this Backbone.history.navigate('', true); and all works fine. But now I need to add GET params to that router to be possible trigger and handle route like this:

var Workspace = Backbone.Router.extend({

  routes: {
    "?:query": "index"
  },

  index: function(query) {
    ...
  }       
});

But unfortunately my index callback don't get executed when I trigger Backbone.history.navigate('?needShowPopup=true', true);

How should I define and trigger route to pass and handle GET parameters for my index route?

Answer:1

I am unable to communicate between my addon and my attach script. The attach event for PageMod works however it doesn't emit my getElements event to my list-getter. How do you use the port.emit ...

I am unable to communicate between my addon and my attach script. The attach event for PageMod works however it doesn't emit my getElements event to my list-getter. How do you use the port.emit ...

I'm trying to programmatically create a pie chart in hopes of turning it into a React Component to reuse. Basically I need a pie chart that is clickable and each slice expands into a whole pie when ...

I'm trying to programmatically create a pie chart in hopes of turning it into a React Component to reuse. Basically I need a pie chart that is clickable and each slice expands into a whole pie when ...

Currently I am working on Learning React and Redux. I have found a boilerplate, and I am working on looking through all of the example code. My problem is I don't completely understand what a lot of ...

Currently I am working on Learning React and Redux. I have found a boilerplate, and I am working on looking through all of the example code. My problem is I don't completely understand what a lot of ...

I have my custom script for map into my webpage,but it no have point mark for exactly ubication: <script> /* Map */ (function () { "use strict"; if (document.getElementById("map")) { ...

I have my custom script for map into my webpage,but it no have point mark for exactly ubication: <script> /* Map */ (function () { "use strict"; if (document.getElementById("map")) { ...

  1. mark point google maps