Created
February 18, 2012 01:50
-
-
Save mikeobrien/1856828 to your computer and use it in GitHub Desktop.
Bootstrapping data with require.js
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
require(['data', 'app'], function(data, app) { | |
return app.start(data); | |
}); |
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
<script data-main="main" src="/content/scripts/require/require.js"></script> | |
<script language="javascript"> | |
define('data', function() { | |
return !{ JsonUtil.ToJson(Model.Data) }; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment