Как добавить строку в область, а затем присвоить ей значение в angularjs, а затем отобразить область в html5?
Пример: HTML TAG:
<table>
<tr>
<td>Transitoria:</td>
<td>
<input type="text" ng-model="formData.transitoryAccount"
ng-keydown="$event.keyCode === 13 && searchGLAccount(formData.transitoryAccount , 'transitoryAccount')">
</td>
<td>{{transitoryAccount.label}}</td>
</tr>
<tr>
<td>Error Account:</td>
<td>
<input type="text" ng-model="formData.errorAccount"
ng-keydown="$event.keyCode === 13 && searchGLAccount(formData.errorAccount, 'errorAccount')">
</td>
<td>{{errorAccount.label}}</td>
</tr>
<tr>
<td>End of Year Profit:</td>
<td>
<input type="text" ng-model="formData.EOYProfitAccount"
ng-keydown="$event.keyCode === 13 && searchGLAccount(formData.EOYProfitAccount, 'EOYProfitAccount')">
</td>
<td>{{EOYProfitAccount.label}}</td>
</tr>
</table>
В контроллере
scope.searchGLAccount = function(srchText, modelName) {
resourceFactory.runReportsResource.get({
reportSource: 'getAccountByAccountNo',
R_accountNo: srchText,
genericResultSet: false
}, function (data) {
scope.glAccount = data[0];
scope.modelName['.label'] = scope.glAccount.entityName;
scope.formData.modelName = scope.glAccount.entityAccountNo;
});
};
Любая помощь высоко ценится .. Спасибо