Hello,
I'm trying to use the following instructions to launch a Controller and associated dialog when I click on a link:
Here's the function in my main controller:
$scope.configureDialog = function(type) {
var dialog = $dialog.dialog({modalFade: false, resolve: {items: function(){ angular.copy($scope[type + 'Widgets'])} }});
dialog.open('dialogs/dashboard-config.html', 'MyController');
};
In controllers.js, MyController is defined as follows:
function MyController($scope, dialog, items) {
$scope.items = items;
$scope.submit = function(){
dialog.close('ok');
};
}
When I click the link to call configureDialog(), I get the following error:
Error: Unknown provider: dialogProvider <- dialog
If I change dialog to $dialog in MyController's constructor arguments, I get the following error:
Error: Unknown provider: itemsProvider <- items
Are the $dialog service's instructions wrong, or am I doing something wrong in my code?
Thanks,
Matt