I have a button on click of that i have to open a popup. This is my configuration for opening modal :
var uibModalInstance = $uibModal.open({
animation: true,
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
controller: 'lsResultPopCtrl',
templateUrl: 'template.html',
windowTemplateUrl: 'template.html',
size: size,
resolve: {
items: function(){
return $scope.items;
}
}
});
Controller code :
app.controller('lsResultPopCtrl', function ($scope, $uibModal, items) {
This code gives me error :
Error: [$injector:unpr] Unknown provider: itemsProvider <- items <- lsResultPopCtrl
I am following this example : https://angular-ui.github.io/bootstrap/
Edit :
In chrome debugger I can see items array in lsResultPopCtrl is loaded with the data, but pop up doesn't show up and i get the error.