First of all, check that your modal script controller is added to the main HTML file, and if it is added (displayed) in the browser (in Chrome, open the web developer tools using the F12 button, then open the "Elements" tab) (This is in case, if you use some kind of tool for creating forests, for example generator-angular from the Yeoman team, do not forget to clear the cache to get the latest update from your code), because I had the same problem :( and I was constantly looking at what was wrong with my code, then I found out that I EP did not add the last script I made (Modal controller), so my code was similar to yours, but the example of your code:
<script src="testlineDetailsController.js"></script>
Secondly, make sure that you use at least one method from the modal instance service in the modal controller: EDIT: (this is optional, you can hide the modal object using the background property of the modal option object)
After that, your application should work.
Now, to solve this problem, another alternative , you can directly write the controller function in the property of the modal options object:
This alternative should work in your application. Therefore, I hope this explanation helps you solve the problem that you have.
source share