How to use the Router function from backbone
Find comprehensive JavaScript backbone.Router code examples handpicked from public code repositorys.
GitHub: foodora/cartodb
55 56 57 58 59 60 61 62 63 64
); var userModel = new UserModel(userData, { configModel: configModel }); var modals = new ModalsServiceModel(); var tableModel = new TableModel(tableData, { parse: true, configModel: configModel }); var editorModel = new EditorModel(); var Router = new Backbone.Router(); var visModel = new VisTableModel(visData, { configModel: configModel }); var layersCollection = new Backbone.Collection(layersData); var layerDataModel = layersCollection.find(function (mdl) { var kind = mdl.get('kind');
676
0
4
GitHub: thejsj/Adelle
70 71 72 73 74 75 76 77 78 79 80 81 82
} } return self; } Router = Backbone.Router.extend( Router() ); })(jQuery); module.exports = Router;
0
3
1
+ 5 other calls in file
GitHub: wotcity/ui-moving-line
214 215 216 217 218 219 220 221 222 223 224 225
/* * ROUTES */ app.AppRoutes = Backbone.Router.extend({ routes: { ':name': 'app', ':name/:endpoint': 'app2', ':name/:endpoint/:key': 'app3'
7
1
3
GitHub: sofiafaddi/REACTJS
645 646 647 648 649 650 651 652 653 654 655 656
} }); const react = ReactDOM.render(<TodoApp name="todo-app" collection={todoItems} users={users.models}/>, document.getElementById('todo')); const Router = Backbone.Router.extend({ routes: { '': 'all', 'active': 'active',
0
0
0
GitHub: Demdis/polis
40 41 42 43 44 45 46 47 48 49 50 51
function authenticated() { return PolisStorage.uid() || PolisStorage.uidFromCookie() || window.authenticatedByHeader; } var polisRouter = Backbone.Router.extend({ gotoRoute: function(route, options) { // this.navigate(route, options); window.location = route; },
0
0
1
+ 2 other calls in file
backbone.View is the most popular function in backbone (151 examples)