Greetings! I have a question for you:
Here is the code snippet that I am working with:
$scope.updateInline = function(fctr, item, fieldName){
var obj = {};
obj[fieldName] = item[fieldName];
obj['id'] = item.id;
[fctr]update( {id:item.id}, obj, function (data) {
if (!data.error) {
notify({ messageTemplate: $scope.notifyMsg.UpS, classes: 'alert-success', duration: 3000});
} else {
notify({ messageTemplate: $scope.notifyMsg.UpE, classes: 'alert-danger', duration: 3000});
}
});
};
In my html file, I have the following input element:
<input type="text" ng-model="item.clientId" ng-ng-change="updateInline('Invites_Fctr',item, 'clientId')" />
I am struggling with passing the 'Invites_fctr' from the HTML to the '[fctr]' parameter in the .update function. It seems like my syntax is incorrect and the [fctr]update(...) is not functioning properly.
Any suggestions on how to improve this would be greatly appreciated. Thank you!