FAQ Database Discussion Community
backbone.js,backbone-views,backbone-routing
What is the best way to switch to a different view when user navigates to a different url. In angular there is ng-view that takes care of this and inserts corresponding templates and in ember its all route based. Is it better to just hide other views elements on routing...
backbone.js,browser-history,pushstate,backbone-routing
The justification In my BB app, I allow rapid input from users which gets queued & sent off periodically in the background to the server. The problem I currently have is if a user leaves the page they effectively discard any pending changes sitting in the queue. So basically what...
javascript,backbone.js,backbone-routing
Honestly I feel a bit stupid asking this question because should be a very simple thing... In my app init, I have: window.myApp = Models: {} Collections: {} Views: {} Routers: {} initialize: -> window.router = new Backbone.Router Backbone.history.start(pushState: true) And then in my View, when I click a button,...
javascript,backbone.js,marionette,backbone-routing
I'm new to Marionette and I just can't get routes to work. I'm using Marionette's 2.4.1 version, and trying to do it the simplest way possible so it'll just work. This code works for old version of Marionette, v1.0.2, which was included in one of the yeoman's generator. I know...
javascript,backbone.js,marionette,backbone-routing
URL : http://localhost:3000/dashboard?ID=10400&Name=10400 I'm trying to get the query params ID and Name from the URL but I get undefined. I have also tried backbone-queryparams but still it does not work. Any idea how to get the current URL with params in Backbone Marionette define([ 'jquery', 'backbone', 'marionette', 'modules/dashboard/controllers/dashboardController', 'backbone.queryparmas'...
javascript,backbone.js,backbone-views,backbone-routing
I have two views, one of them have a search box that includes a button "Search" with id="search". In the second view I want when click in button "Search" make a search. But for this happens I need to get the id. How can do this? Here the code of...
javascript,jquery,backbone.js,backbone-views,backbone-routing
I'm creating a Twitter Bootstrap multi-step modal. This is how I'm trying to get the workflow to work: User clicks on button to open modal... modal opens User types in access code, clicks next Server checks if access code exists. If it exists user moves on to next step in...
javascript,backbone.js,backbone-routing
I tried the below code that does not work. Also i searched via google but find nothing. Backbone's official documentation does not have an entry about loadUrl. app_router.on('route:page', function(id, name) { ... }); app_router.on('route:file', function(id, name) { // first open the page Backbone.history.loadUrl("page", function() { // and open the file...