New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

backbone.unloader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone.unloader

Dynamically load and unload Backbone routes

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

backbone-unloader

npm version Build Status Dependency Status

Dynamically load and unload Backbone routes. Which provides the ability to:

  • Limit access to routes based on user rights
  • Can be triggered based on events like signoff/signon

Getting Started

Install with bower. If you haven't used bower before, be sure to check out the Getting Started guide, as it explains how to install Bower and install bower packages. Once you're familiar with that process, you may install this plugin with this command:

bower install backbone.unloader --save

Documentation

Backbone.Unloader extends the Backbone.Router to provide away to dynamically load an unload routes. It can be included in an application in the following ways:

AMD or CommonJS

var Backbone = require('backbone');
var unloader = require('unloader');

var router = new Backbone.Router();

Global

var router = new Backbone.Router();

Loading Routes

Routes can be loaded dynamically based on an event or a condition.

var router = Backbone.Router.extend({
  initialize: function(session){
    session.on('login', function(){
      this.loadRoutes({
        'home': 'showHome',
        'user/:id': 'showUser'
      });

    }.bind(this));
  }
});

Unloading Routes

Routes can be unloaded dynamically

var router = Backbone.Router.extend({
  initialize: function(session){
    session.on('logoff', function(){

      this.unloadRoutes();

    }.bind(this));
  }
});

Keywords

FAQs

Package last updated on 18 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc