Просто используйте parseInt ()
Замените следующее в вашей add
функции
$scope.params.age = parseInt(age);
$scope.params.weight = parseInt(weight);
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.items = [
{
"params": {
"age": 22,
"weight": 66
}
},
{
"params": {
"age": 19,
"weight": 54
}
},
{
"params": {
"age": 17,
"weight": 75
}
}
]
$scope.add = function(params , age, weight) {
$scope.params = params;
if(age)
$scope.params.age = parseInt(age);
if(weight)
$scope.params.weight = parseInt(weight);
console.log($scope.params);
}
$scope.update = function(){
}
});
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<div ng-repeat="n in items">
<ul ng-repeat="(name, param) in n.params" style="list-style-type: none;">
<li>{{name}} : {{param}}</li>
</ul>
<input style="display:inline;width:130px;margin-bottom:5px;margin-top:5px;" class="form-control" name="text" placeholder="age" ng-model="age">
<input style="display:inline;width:115px;margin-bottom:5px;margin-top:5px;" class="form-control" name="text" placeholder="weight" ng-model="weight">
<br />
<button class="btn btn-warning" type="button" ng-click="add(n.params , age , weight)">Update</button>
</div>
<br />
</body>
</html>