Separating the AngularJS Controllers into Different Files in Qlik Sense Mashup
I am working on a Qlik Sense Mashup project and I am having a lot of trouble managing AngularJS controllers in separate files. In my mashup, there is almost 30 controllers in a single JS file and it causes so much complexity. My file structure looks like this:
views |Home.html |FirstPage.html |SecondPage.html MyMashup.css MyMashup.html MyMashup.js MyMashup.qext wbfolder.wbl and here is an example of what my code looks like:
// bootstrap the angular app angular.bootstrap(document, ["myAngularApp", "qlik-angular"]);
}); What I want to do is, separate these controllers into different files and import these controllers into my main JS file (which is MyMashup.js). I found a solution in this issue but it didn't work. When I try this, I couldn't be able to import this controller in MyMashup.js file. I am getting an error like 'Uncaught SyntaxError: Cannot use import statement outside a module'