Im trying to update some data when the map button is clicked, but the ng-click function doesnt seem to work. Below is my code.
<textarea id="xmltest" class="form-control" style="margin-top:2%; width: 60%;" rows="10" >
Resulting definition:<![CDATA[<?xml version='1.0' encoding='UTF-8'?>
<ColumnMapping>
{{result}}
<mapping targetIndex='0' sourceIndex='0' dataType='String' businessKey='1' alias='Practice'/>
<mapping targetIndex='1' sourceIndex='1' dataType='String' businessKey='0' alias='Client_Name'/>
</ColumnMapping>
]]>
</textarea>
<a style="margin-top: 10%;margin-right: -70%" href="#" class="btn btn-primary" ng-click="mapFields()" id="MappingFields">Map</a>
<script type="text/javascript">
mapFields = function($scope){
$scope.result= "Code works";
};
</script>
</body>
When I click on the map button, nothing happens. No error is also getting displayed. Any help on this is much appreciated. Thanks in Advance
ng-click="mapFields()"
function?