This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from 'underscore'; | |
import Backbone from 'backbone'; | |
// all the routes from the mini-apps | |
const custom_apps_routes = { | |
about: { | |
'about': 'about', | |
}, | |
heavy: { | |
'heavy(/:heavy_param)': 'heavy', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
+ import AppFinder from './app_finder'; | |
export default Backbone.Router.extend({ | |
routes: { | |
'': 'home', | |
'main_app_part': 'mainAppPart', | |
'*handleMissingRoute': 'handle404' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
import Router from './router'; | |
- import AboutApp from './apps/about/'; | |
- import HeavyApp from './apps/heavy/'; | |
$(() => { | |
new Router(); | |
- AboutApp(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
export default Backbone.Router.extend({ | |
routes: { | |
'': 'home', | |
'main_app_part': 'mainAppPart', | |
- 'about': 'about', | |
- 'heavy(/:heavy_param)': 'heavy', | |
'*handleMissingRoute': 'handle404', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
import Router from './router'; | |
+import AboutApp from './apps/about/'; | |
+import HeavyApp from './apps/heavy/'; | |
$(() => { | |
new Router(); | |
+ AboutApp(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
export default Backbone.Router.extend({ | |
routes: { | |
'heavy(/:heavy_param)': 'heavy', | |
}, | |
heavy(heavy_param) { | |
$('#app').html(`You're viewing that heavy app, heavy param from the URL is: ${heavy_param}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
export default Backbone.Router.extend({ | |
routes: { | |
'about': 'about' | |
}, | |
about() { | |
$('#app').html("You're viewing the about page. It is full of graphics"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Router from './router'; | |
export default () => { | |
new Router(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
import Router from './router'; | |
$(() => { | |
new Router(); | |
Backbone.history.start(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Backbone from 'backbone'; | |
import $ from 'jquery'; | |
export default Backbone.Router.extend({ | |
routes: { | |
'': 'home', | |
'main_app_part': 'mainAppPart', | |
'about': 'about', | |
'heavy(/:heavy_param)': 'heavy', | |
'*handleMissingRoute': 'handle404', |