I'm having difficulty working with ngdialog , could someone please tell me how to retrieve data from a ng-dialog template?
below the code I'm working on
ngDialog.open({
template: "\
<div ng-controller='EstadosController'> \
<div style=\"text-align: center; font-weight: bold;font-size: 18px; \">Informações do documento</div>\
<div style=\"margin:15px;\"> \
<label style=\"font-weight: normal;\">Data Documento</label> \
<div> \
<input style=\"width:250px;\" type=\"date\" label=\"Data Documento\" ng-model='item.dataDocumento' > \
</div>\
</div> \
<div style=\"margin:15px;\"> \
<label style=\"font-weight: normal;\">Tipo Documento</label> \
<div> \
\ <select ng-model='item.tipoDocumento' ng-options=\"item as item.label for item in items track by item.id\" ></select>\
</div>\
</div> \
<div style=\"margin:15px;\"> \
<label style=\"font-weight: normal;\">Descrição Documento</label> \
<div> \ <textarea ng-model='item.descricao' row=\"30\" style=\"width: 250px; height:150px\"> </textarea> \
</div> \
</div> \
<div style=\"text-align:center\"> \
<input style='margin:5px; width: 100px;' type='button' value='SALVAR' ng-click=\"closeThisDialog('SALVAR',item)\"> \
<input style='margin:5px; width: 100px;' type='button' value='CANCELAR' ng-click=\"closeThisDialog('CANCELAR',item)\"> \
</div>\
</div>",
plain: true,
closeByNavigation: false,
closeByDocument: false,
closeByEscape: true,
showClose: true,
className: 'ngdialog-theme-plain',
preCloseCallback: function (value, item) {
if (value == 'SALVAR') {
var params = {};
params.dataDocumento = item.dataDocumento;
params.tipoDocumento = item.tipoDocumento;
params.descricao = descricao;
}
}
});