Skip to content

Instantly share code, notes, and snippets.

@ehynds
Created March 29, 2013 17:47
Show Gist options
  • Save ehynds/5272377 to your computer and use it in GitHub Desktop.
Save ehynds/5272377 to your computer and use it in GitHub Desktop.
// base page that all others extend
// src/scripts/app/views/base/page.js
define([
"app",
"views/common/navigation",
"views/common/searchOverlay",
"views/common/your-custom-gigya"
], function(app, NavigationView, SearchView, MyGigyaView) {
return app.views.BaseView.extend({
// Each page's root view is the body element
el: document.body,
// If you overwrite this function be sure to call
initialize: function() {
// ... stuff here
// make your stuff work
MyGigyaView();
}
});
});
// put this in
// src/scripts/app/views/common/
define([ "app" ], function(app) {
// if you want something to run the second this file
// has been downloaded, put it outside of the returned
//function.
return function() {
// initialize your custom integration here.
// app namespace is available for you to use
// if you so desire.
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment