Quick question... I have a define for requirejs setup like so... it works about 8-10% of the time. It seems that a resource sometime isn't loaded in time. Can I wrap the above var require list in a way that ensures the code below it will run correctly? The error I get when it doesn't work is this:
Uncaught Error: Module name "views/association/Associations" has not been loaded yet for context: _
define(function( require ){
// requirejs - too many includes to pass in the array
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
namespace = require('namespace'),
// models
CustomerModel = require('models/customer/customer'),
// collections
// views
BaseView = require('views/baseView'),
Auth = require('views/auth/Auth'),
SideNav = require('views/sidenav/SideNav'),
CustomersView = require('views/customer/Customers'),
AssociationsView = require('views/association/Associations'),
//CustomerListCpeView = require('views/customer/CustomerListCpe'),
//CustomerAddCpeView = require('views/customer/CustomerAddCpe'),
// templates
CustomerDetailTemplate = require('text!templates/customer/customerDetail.html');