I am currently faced with the following scenarios:
<input ng-model="something" />
<button ng-click="modify(something)">Modify</button>
Within the controller, there is this method:
$scope.modify = function (value) {
value = value + " and some additional text";
};
Despite having the modify
method in place, it seems to be ineffective.
My objective revolves around creating a function capable of altering an object from the model based on parameters provided. For instance, a function x
that takes an object as input parameter, allowing modifications to said object within the function itself.
What steps should I take to accomplish this goal?
For further details, refer to this sample fiddle.