Created
February 6, 2016 18:43
-
-
Save somebody32/878f5e6eb6d7a4d6a1fb to your computer and use it in GitHub Desktop.
Extracting routes
This file contains hidden or 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
port Backbone from 'backbone'; | |
import $ from 'jquery'; | |
+ import routes from './routes'; | |
export default Backbone.Router.extend({ | |
- routes: { | |
- 'about': 'about', | |
- }, | |
+ routes, | |
about() { | |
$('#app').html(`You're viewing about page. It was loaded in async way`); | |
} | |
}); |
This file contains hidden or 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
export default { | |
'about': 'about', | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment