Closed Templarian closed 10 years ago
I'm not at all familiar with how JS intellisense works, but I was thinking something like this, but have given up.
for (var i in window) {
var m = null;
if (m = i.match(/^(\w+)(Application|App)$/)) {
intellisense.logMessage(i + ' ' + m[1]);
// So... map mainApp to mainControllers I guess.
intellisense.????(window[m[1] + 'Controllers'], window[i]);
intellisense.????(window[m[1] + 'Services'], window[i]);
}
}
It sounds to me like in your example, you want to map mainApp to map to a different variable, such as mainControllers or mainServices. I'm not inclined to enforce this convention. The mainApp variable should be what it was declared to be.
The code already contains logic to pick up global modules in window scope (see issue #3). I suggest declaring the mainControllers and mainServices modules before the mainApp module, but I'm not sure that will solve the problem. Please feel free to fork and add a test file (or multiple files) that demonstrate the problem you're having, and when I get a chance I'll take a look.
I need to stop coding at 2am. Really bad oversight on my part.
Great work on this project, not defining the module first was the issue.
Thanks, Austin
Some people place their controllers and services into
___Controllers
and___Services
modules.Is there any global way you can map
mainApp
to either of these global modules? I tried for a while to modify your script to do it, but I'm lost.Great work with this file, it is amazing! For now I just removed these modules.
Thanks, Austin