Simple way of opening modal with ngDialog is this:
ngDialog.open({
template: 'template.html',
controller: 'someCtrl'
})
How can I send variables to that 'someCtrl'?
Is there such thing as 'resolve' in ngDialog?
Example from angular-bootstrap modal:
$modal.open({
template: "<p>This is template</p>",
controller: "someCtrl",
resolve: {
someVar: function(){
return "Value of someVar"
}
}
})
this would open the modal send the 'someVar' to the responsible Controller.
UPDATE:
It seems like new version of ngDialog added this feature:
ngDialog.open({
controller: function Ctrl(dep) {/*...*/},
resolve: {
dep: function depFactory() {
return 'dep value';
}
}
});