Имеется 2 контроллера.
app.controller("adminController", ["$scope", "$modal", "productsService", "ordersService", function ($scope, $modal, productsService, ordersService) {
......
$scope.openAddProductModal = function (size) {
var modalInstance = $modal.open({
templateUrl: '/modal/addproduct',
controller: 'addProductController',
size: size
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
});
};
}]);
Контроллер модального окна
app.controller('addProductController', ["$scope", "$modalInstance", "productsService", function ($scope, $modalInstance, productsService) {
$scope.ok = function () {
$modalInstance.close();
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
DI не работает, Unknown provider: $modalInstanceProvider <- $modalInstance <- addProductController. Подкажите решение. Благодарю!