I'm new in angular and my english is not very good, so i try to explain my problem the best i can.
I'm using the ui.bootstrap.modal in my project, and i need that the modal window i open can be controlled by another controller and not only ModalInstanceCtrl. I want to ModalInstanceCtrl manage the common actions in a modal window, (set title, close, etc..) and then another controller (SpecificController) manage specific actions.
So this is my modal template view now:
<h1>
{{title}}
<a ng-click="closemodal()">x</a>
</h1>
<div ng-include src="specificTemplate.html" ng-controller="SpecificController"></div>
My idea is that specificTemplate.html and SpecificController can be set as a variables in the future and so having a system for manage modal windows with common actions, and other specific actions for each modal window. The include template works fine, but with the ng-controller label i get the following error:
Error: [$injector:unpr] Unknown provider: $modalInstanceProvider <- $modalInstance
I have SpeficController defined in my controllers section.
In other similar questions in StackOverflow, the problem were that ng-controller="ModalInstanceCtrl" was set in the template, but i want/need another controller for specific actions as a child one. How can fix this?