Questions tagged [backbone-routing]

Backbone.js is a JavaScript framework that provides structure to RESTful web applications. Backbone also includes URL fragment or History-based routing. This tag is for questions related to Backbone's routing system.

From the fine manual:

Web applications often provide linkable, bookmarkable, shareable URLs for important locations in the app. Until recently, hash fragments (#page) were used to provide these permalinks, but with the arrival of the History API, it's now possible to use standard URLs (/page). Backbone.Router provides methods for routing client-side pages, and connecting them to actions and events. For browsers which don't yet support the History API, the Router handles graceful fallback and transparent translation to the fragment version of the URL.

419 questions
0
votes
1 answer

Backbone view not rendering correctly on subsequent calls to route handler

I'm having a problem with rendering a backbone.js view successfully from a route handler (browser application). My javascript module is currently setup like this: $(function () { // DOM ready myModule.Init(); }); var myModule = (function ()…
Bob Yexley
  • 2,704
  • 4
  • 24
  • 35
0
votes
1 answer

Backbone.js router initialize function

I'm pretty new to backbone.js and am still learning how everything works. I'm trying to understand how the initialize option of the backbone router works, and haven't been able to find any good documentation or examples, so I was hoping someone here…
Bob Yexley
  • 2,704
  • 4
  • 24
  • 35
0
votes
1 answer

Backbone.js routing - append key/value to the URL

I have a case where I use tabs for different views with these routes : #view/list and #view/table, but I have filters as well which works among different views and their routes are #filter/all, #filter/key, etc. Since my tabs have these links:
georgiar
  • 379
  • 3
  • 7
0
votes
0 answers

Unit-test for a the web application module

I am writing a jasmine unit-test for a sub-app module using Backbone.Marionette Can someone give me some idea, what to test? The module to test looks like this. /*global define*/ define([ 'app', 'marionette', 'tasks/views/list', …
Lorraine Bernard
  • 13,000
  • 23
  • 82
  • 134
0
votes
1 answer

Backbone.js Task App how should grouped view look like

I am developing a task app in Backbone.js for FUN and one of feature is grouped view. Grouped view will display tasks that are grouped according to their done status. Currently i can construct the grouped object from the collection. Constructing the…
Deeptechtons
  • 10,945
  • 27
  • 96
  • 178
0
votes
1 answer

Backbone.Router wrong match fragment

I have the following routes object: routes: { "*defaults": "home", '#test': 'test' } Here's the url options: myApp.html // home is called as desired myApp.html#test // home is called instead of test What did I miss?
Lorraine Bernard
  • 13,000
  • 23
  • 82
  • 134
0
votes
1 answer

Backbone.js - View not reloading

So I've managed to figure out how to populate my collection from an external file, and render a view based on a url, but I'm running into a problem. The code below is working as intended, except on page load, I'm getting the following…
Brian
  • 49
  • 1
  • 4
0
votes
1 answer

Backbone Router… how to deal with url

I have an application which main files look like these (1), (2), (3). The Backbone.Router works fine in this case (because it triggers #page): http://localhost/index.php#page How should I configure it if the url is the following (in order to…
Lorraine Bernard
  • 13,000
  • 23
  • 82
  • 134
-1
votes
2 answers

Accommodate multiple Backbone views, models and collections in the same page

I am struggling with displaying two models/collections in the same page.
Tung
  • 1,579
  • 4
  • 15
  • 32
-1
votes
1 answer

how to parse and bind complex JSON in backbone.js with view model controller approach

I am using one complex JSON structure as a result of one Ajax call. Here I need "many different kinds of nested models in one parent model".For each person, I am using one EmployeeContext. I need this as my parent model. Within this EmployeeContext,…
-1
votes
1 answer

Backbone.js doesn't work

I have the next html page: ...
 
... the 'pep.js' contains the next content: var pep = { models: { }, …
-1
votes
1 answer

Famous (aka Famo.us) with Backbone router?

Anyone know how to use Famou.us with a router, i.e. Backbone? They have a slick looking Twitter clone, but it doesn't update the URL in web browser. Looking for a decent router option for Famous. See the Twitter clone here:…
Giant Elk
  • 5,375
  • 9
  • 43
  • 56
-2
votes
1 answer

Running backbone app on different URLs

Is it possible for the backbone router to recognize that the URL it is running on is different? I need the behavior of the app to change before the hash-bangs. /members#login vs /members/benefits#about (Need the app to behave differently here)
-2
votes
1 answer

boilerplate Collection View doesn't update?

I have created a tiny app in my website using yeoman generator-bbb. The problem is that the collection view doesn't update. Here is the main code: app.js: define(function(require, exports, module) { // External dependencies. var _ =…
Tristan
  • 1
  • 1
1 2 3
27
28