Я использую эту форму для выполнения поиска
<form id="searchForm" name="searchForm" class="form-inline" ng-submit="ul.callServer(criteria)" novalidate>
<div class="form-group" style="margin-top: 5px;">
<label class="searchFormLabel" for="searchUserName">User Name</label>
<input type= "text" ng-model = "criteria.userName"/>
<label class="searchFormLabel" for="searchUserName">First Name</label>
<input type= "text" ng-model = "criteria.firstName"/>
<label class="searchFormLabel" for="searchUserName">Last Name</label>
<input type= "text" ng-model = "criteria.lastName"/>
</div>
<!---------------------------------------------------users----------------------------------------------------->
<div class="form-group" style="margin-top: 5px;" ng-init="criteria.userType='-1'">
<label class="searchFormLabel" id="searchUser" for="searchUser">
User Type
</label>
<label style="margin-left: 0px">
<input type="radio"
name="userTypeRadioOptions"
id="searchAll"
value="-1"
ng-init="initForm()"
ng-model="criteria.userType"
ng-click="clickAllOrdersButton()">
All
</label>
<br>
<label style="margin-left: 124px">
<input type="radio"
name="periodRadioOptions"
id="searchPending"
value="0"
ng-init="initForm()"
ng-model="criteria.userType">
Back Office
</label>
<br>
<label style="margin-left: 124px">
<input type="radio"
name="periodRadioOptions"
id="searchFinished"
value="1"
ng-init="initForm()"
ng-model="criteria.userType">
Mobiele
</label>
<br>
<label style="margin-left: 124px">
<input type="radio"
name="periodRadioOptions"
id="searchFinished"
value="2"
ng-init="initForm()"
ng-model="criteria.userType">
Klanten
</label>
</div>
при нажатии на кнопку "поиск" я вызываю функцию ul.callServer (критерии)
как вы можете видеть, я могу фильтровать по типу строк, и это сценарий, который мне нужно реализовать
я хочу вызвать функцию ul.callServer (критерии) из контроллера, когда я закончу операцию редактирования
если не ясно, скажите мне, и я объясню больше
Например: - Я ищу строки с типом "X", поэтому отображаются 3 строки - я редактирую одну строку и меняю тип с "X" на "Y" - когда я нажимаю кнопку "Сохранить", чтобы сохранить новые значения строк, я хочу 1- обновить значение отредактированной строки 2- (автоматически и без необходимости повторного нажатия кнопки) отображать только строки с типом "X",
Я нахожу решение
$timeout(function(){
angular.element('#searchForm').triggerHandler('submit');
});