Angular UI Bootstrap Modal: [$injector:unpr] Unknown provider: $uibModalInstanceProvider

后端 未结 5 806
生来不讨喜
生来不讨喜 2020-12-14 08:54

This is a bit strange. When I search this issue online I see many pages of Google results and SO solutions... but none seem to work!

In a nutshell, I am trying to

5条回答
  •  有刺的猬
    2020-12-14 09:32

    Answer Found! After hacking away with my friend, we discovered the answer. I wanted to post it here just in case someone else reads this.

    It turns out that we had an ng-controller in our modal window that was in a div tag that wrapped the entire html form that was in the modal. Previously, this worked fine when our form was NOT in a modal (it had a separate URL) but for some reason it breaks when it is in a modal. The ng-controller was referencing the addEntryCtrl. Immediately after removing it, the form worked!

提交回复
热议问题