I have a following html
:
<div ng-app="app" ng-controller="NeuesDokumentCtrl" >
<table cellpadding="0" cellspacing="0" border="0" >
<tbody>
<tr>
<td>
<textarea ng-model="kunde"></textarea>
</td>
<td>
<img src="/_layouts/15/images/checkitems.gif" ng-click="copy(kunde)" />
</td>
</tr>
<tr>
<td>
<input type="text" ng-model="searchField" />
</td>
<td>
<img src="/_layouts/15/images/delete.gif" ng-click="delete()" />
</td>
</tr>
</tbody>
</table>
</div>
My Controller
has:
$scope.kunde;
$scope.searchField;
$scope.copy = function (value) {
$scope.searchField = value;
}
$scope.delete = function () {
$scope.searchField = "";
}
When I test it in a normal page (NOT a SharePoint page) it works.
In Sharepoint it works if I don't edit the second field manually by typing in something.
I write something in the first box. When clicking on the first IMG the value gets copied into the second box. When I click on the second IMG the second box gets cleared. But when I write something in the second box, the two IMGs stop working - the angular functions are called but the model searchField
doesn't display the right information.
I get no errors in the console.
Here's a fiddler