Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8841083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:37:24+00:00 2026-06-14T10:37:24+00:00

I am using Backbone.js and I have a router. this is my routes property

  • 0

I am using Backbone.js and I have a router. this is my routes property of the router:

routes: {
    "pagea": "pageafunc",
    "pageb": "pagebfunc",
    "pagec": "pagecfunc",
}

is it possible to add a route that looks like this:

"mypath/*subroute": function(subroute) {
    //do somethong  
}

?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:37:26+00:00Added an answer on June 14, 2026 at 10:37 am

    Nope, the routes object can only have string values.

    If you want to pass your own callback, you need to set up the route programatically. For instance, in your router’s initialize function, you can do this:

    this.route('mypath/*subroute', 'mypath_subroute', function(){
      // Route callback stuff.
    });
    

    That said, this can get very unreadable quickly, and it means that you have to scan through your initialize functions to know all of the routes you have defined, so storing all of the routes in the routes object is much cleaner. Or at least keep the route function body on the Router itself and keep the route paths in a separate section for readability.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using backbone.js, is it possible to chain Url routes? if I have something like
Have done some working samples using Backbone Router, but is there a way to
I have a router setup like so: var AppRouter = Backbone.Router.extend({ routes: { /agents/:id:
I'm using Backbone.js to render a list of items. THis is working, I have
I have struggled with this for quite a long time. I'm using Backbone.js along
I have been using Backbone.js to act as a middleman between Wordpress (using the
I have a View (created using Backbone.View.extend) and a JSON object, I actually get
I am using backbone.js here is my scenario Lets say I have a view
I'm developing application using backbone.js & jquery. I have following code in model: runReport:
I have a models.DateTimeField() field in my django model. I am using backbone to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.