Skip to content

Instantly share code, notes, and snippets.

@crisu83
Last active December 24, 2015 06:19
Show Gist options
  • Save crisu83/6756240 to your computer and use it in GitHub Desktop.
Save crisu83/6756240 to your computer and use it in GitHub Desktop.
/**
* Initializes the application.
*/
var initialize = function() {
var self = this;
$('*[data-view]').each(function() {
var $el = $(this),
viewClass = 'app/views/' + $el.data('view');
require([viewClass], function(View) {
new View({el: $el[0], app: self});
});
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment