Skip to content

Craga89/backbone-url-helper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

What is it?

This is a simple extension to manipulate the browser navigation. Is not very convenient work with backbone routing url using strings. We have routing!

This library extends the prototype of backbone routing with one method - to(routeAction, routeParams, navigateOptions)

Example

```
var Main = Backbone.Router.extend({

    routes: {
    	"":"index",
    	"category/:id/:page": "category"
    }

   //...

});

var routing = new Main();
Backbone.history.start({pushState: true});


routing.to('index');		// navigate to url "/"

routing.to('category', {	// navigate to url "/category/1/1"
    'id':1,
    'page':1
});

```

About

Helper for manipulate url navigation via routing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published