i have this call inside a controller Directive
ngDialog.openConfirm({
template : '<form-directive></form-directive>',
plain : true,
closeByNavigation : true,
scope : $scope
})
.then(function( response ) {
$log('SENDED');
});
Component
ngDialog.openConfirm({
template : '<form-component></form-component>',
plain : true,
closeByNavigation : true,
scope : $scope
})
.then(function( response ) {
$log('SENDED');
});
HTML for both
<form ng-submit="alert("Hello !!!")">
<button type="submit">Send</button>
</form>
When i click the Button on directive, i see the SENDED message on the console, but for components just looks like ignore every NG-attribute, clicks on the button do nothing, but load the template rightfully.
Same template, same everything, Is exactly the same, so maybe is a ngDialog kind of bug with the components right ?
I just want the ng-attributes working inside and if i click button submit then close the dialog and get the promise log message
The Directive also fail if i use the scope: { obj : '=' } property inside it The components ignore everything.
I think is some kind of problem with the Scopes - The scope declaration in the directive ( or the binding in the component ) - And the scope in the openDialog object