Skip to content

Commit

Permalink
updates and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
voronianski committed Aug 11, 2014
1 parent 67ede45 commit ebc023b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ or
ngDialog.open({
template: 'externalTemplate.html',
controller: ['$scope', 'otherService', function($scope, otherService) {
// controller logic
}]
});
```
Expand Down
5 changes: 2 additions & 3 deletions js/ngDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,10 @@
$dialog.html('<div class="ngdialog-overlay"></div><div class="ngdialog-content">' + template + '</div>');

if (options.controller && (angular.isString(options.controller) || angular.isArray(options.controller) || angular.isFunction(options.controller))) {
var locals = {
var controllerInstance = $controller(options.controller, {
$scope: scope,
$element: $dialog
}
var controllerInstance = $controller(options.controller, locals);
});
$dialog.data('$ngDialogControllerController', controllerInstance);
}

Expand Down
3 changes: 2 additions & 1 deletion js/ngDialog.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ebc023b

Please sign in to comment.