I have a file "A.js" in which I have a initialised a module as given below
angular.module("x", []);
I have another file "B.js" in which also I have initialised a module as give below, in this case it is dependent on the "x" module as defined above in A.js
angular.module("y", ["x"]);
Now in the html file I have declared the script files as given below -
<script src = "B.js" ></script>
<script src = "A.js" ></script>
On loading the application, I am getting below error -
"Uncaught Error: [$injector:unpr] ..."
Question - Is the above error because the sequence in the HTML file should have been, first load A.js and then B.js since "y" module in B.js is dependent on "x" module in A.js?
Note - I have checked all the other probable places which could have caused the error, they are all fine. I am left with the above question only.