Coder Social home page Coder Social logo

Comments (2)

geekdave avatar geekdave commented on July 21, 2024

@schacki : This looks great! I've been thinking about doing something similar for awhile now.

Generally in my apps, I avoid using the router as the navigation mechanism from within the app. Instead, I use an event-based system for page changes, and then my router listens to those changes and updates the URL accordingly.

The problem with this is that I've been forced to have my router interpret every type of navigation event, and conditionally construct the URL based on hardcoded logic in a nasty if/else block. With your solution, this logic would be much cleaner.

Please submit a pull request and I will accept it. This repo is in dire need of a sample app so that we can test features such as this, but I haven't had time to make one.

Thanks for contributing!

from backbone.subroute.

schacki avatar schacki commented on July 21, 2024

I am happy to send you a pull request, just be aware that it is completely
untested. Not even the syntax is tested, since I only had the chance to
edit the code in the Github edit mode last days.

On Wednesday, August 22, 2012, Dave Cadwallader wrote:

@schacki https://github.com/schacki : This looks great! I've been
thinking about doing something similar for awhile now.

Generally in my apps, I avoid using the router as the navigation mechanism
from within the app. Instead, I use an event-based system for page
changes, and then my router listens to those changes and updates the URL
accordingly.

The problem with this is that I've been forced to have my router interpret
every type of navigation event, and conditionally construct the URL based
on hardcoded logic in a nasty if/else block. With your solution, this logic
would be much cleaner.

Please submit a pull request and I will accept it. This repo is in dire
need of a sample app so that we can test features such as this, but I
haven't had time to make one.

Thanks for contributing!


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-7938996.

from backbone.subroute.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.