Angular 1.x–Finding error in module using small recursion

25 בApril 2016

Recently, to have an application angular 2.0 ready I’ve divided an angular 1.5 application to small modules. Of course this process wasn’t a straight forward one, however finding where there is a missing or error module was critical, otherwise I’ll get an error message on the main module I have a little to do with. Therefore, I’ve built a small recursive function, using the module.requires array property (available from v1.2) , which I want to share: 1: function getModule(moduleName){ 2: console.log('Getting module ' + moduleName); 3: var...
one comment