-
Notifications
You must be signed in to change notification settings - Fork 338
build 1.5.0-build.4376+sha.aff74ec and batarang #279
Comments
@btford @SomeKittens Do you know what could be causing this? I assume batarang decorates the angular.Module functions / or provides its own implementation, and .component isn't yet part of that. |
@Narretz Yep, that'd be the first place to look. I've got some time, checking into this |
Here's the relevant code: angular.module = function(name, requiresOriginal) {
var module = originalAngularModule.apply(this, arguments),
name = module.name;
module.requiresOriginal = requiresOriginal;
modules[name] = module;
var modToCheck = getModule(name, true);
//check arguments to determine if called as setter or getter
var modIsSetter = arguments.length > 1;
if (modIsSetter) {
hasNameSpace(name);
}
if(modToCheck && modToCheck.requiresOriginal !== module.requiresOriginal && modIsSetter) {
if(!modData.createdMulti[name]) {
modData.createdMulti[name] = [getModule(name,true)];
}
modData.createdMulti[name].push(module);
}
modData.createdModules[name] = module;
return module;
}; Since we're returning the result of a call to the original |
hmm. probably |
I still think the problem is within Batarang. It is somehow defining Will have to take a closer look to make sure, though. |
Hm...yes, Batarang seems to have it's own loader (to retain compatibility with I'm punting this ba...ehm...re-opening this for further investigation 😃 |
Well, I never was very good at football anyway. Yep, that's us, need to fix that loader. Completely forgot about it. |
y'know what? Double my bad - this is a dupe of #275 |
If you use the .component helper form this build, and you have batarang active, the following error will be thrown.
script.js:8 Uncaught TypeError: angular.module(...).component is not a function
Took me some time to figure out what was happening...
Disable batarang, and your component(s) start working!
Posted here also as sugessted in #13275
The text was updated successfully, but these errors were encountered: