tbranyen/layoutmanager-example — Issue #5: Uncaught TypeError: Cannot read property 'View' of undefined
Author: jessecravens
Created: 2012-02-29 01:52:53+00:00
State: open

I'm getting after adding layoutmanager plugin to backbone boilerplate.
All scripts are rendering, but Im wondering if it the execution order.

I dont know require.js that well, but it appears that layout.manager is loading before backbone.js.
I'm not sure if thats it and Im not sure how require.js is handlin the execution order.

Uncaught TypeError: Cannot read property 'View' of undefined

Here is my requires on main.js

require([
"namespace",

// Libs
"jquery",
"use!backbone",

// Modules
"modules/example",

// Plugins
"plugins/backbone.layoutmanager"
],

and config.js

// Set the require.js configuration for your application.
require.config({
// Initialize the application with the main application file
deps: ["main"],

paths: {
// JavaScript folders
libs: "../assets/js/libs",
plugins: "../assets/js/plugins",

// Libraries
jquery: "../assets/js/libs/jquery",
underscore: "../assets/js/libs/underscore",
backbone: "../assets/js/libs/backbone",

// Shim Plugin
use: "../assets/js/plugins/use",
layoutmanager: "../assets/js/plugins/backbone.layoutmanager"

},

use: {
backbone: {
deps: ["use!underscore", "jquery"],
attach: "Backbone"
},

underscore: {
attach: "_"
},

layoutmanager: {
deps: ["use!underscore", "jquery"]
}
}
});