It seems like I miss running r.js over code with AngularAMD.
.when('/', angularAMD.route({
templateUrl: 'views/home.html',
controller: 'HomeCtrl',
controllerUrl: 'controllers/home',
data: {
name: 'home'
}
}))
I have the following route defined which works fine as long as I don't run r.js, but after I do I'm getting the following error,
Uncaught Error: undefined missing controllers/home
Is the name of your js file for the home controller named
home.js
?If not - then you will want the
controllerUrl
to equal the exact name without the.js
at the end. -controllers/homeCtrl
orcontrollers/homeController
- mattering if that is how you've named your controller's js file.