Skip to content

Instantly share code, notes, and snippets.

fade: (opacity, callback) -> | 10 if (url === this.get('currentView.src')){
11 currentOpacity = @$().css('opacity') | 11 this.get('controller.videoPromise').resolve();
12 return callback() if currentOpacity == opacity | 12 return;
13 | 13 }
14 @$().css('opacity', opacity) | 14

What is the proper way to load requirejs modules for models/views/collections in a backbone project?

I am using Yeoman to create a scaffolding for the app and am only starting to use require js.

My main.js file:

require.config({
    paths: {
        jquery: '../components/jquery/jquery',