Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require.js support #74

Open
tracend opened this issue Nov 18, 2013 · 3 comments
Open

Require.js support #74

tracend opened this issue Nov 18, 2013 · 3 comments

Comments

@tracend
Copy link
Member

tracend commented Nov 18, 2013

Defining the APP namespace is decent but it is strictly hardcoded to the set objects.

Using a module-based loader like Require.js is possible in the current state but the APP object needs to be exported and the routers saved in APP.Routers.

Maybe the initialization should be more fluid manner to allow dynamic loading of routers when define is available in the global namespace...

@tracend
Copy link
Member Author

tracend commented Mar 30, 2014

Basic implementation in place. Loading backbone.app in this manner will require a callback and optionally can accept the path to the router.

new APP({ 
    require: "/path/to/router"
}, function( app ){
    window.app = app;
});

@tracend
Copy link
Member Author

tracend commented Mar 30, 2014

Closing as addressed

@tracend tracend closed this as completed Mar 30, 2014
@tracend
Copy link
Member Author

tracend commented Jun 19, 2014

Re-opening to improve how the lib works with require.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant