I have an array of objects. I displayed the names in input fields. Now I want the updated object (whatever user fills in input field) on button click
Example if I enter “abcde” and “pq” in input field it should show update object on button click
[
{
name:'abcde’
},
{
name:'pq'
}
];
http://plnkr.co/edit/51BlTe5tAEgMV7ZlJLKV
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.c = [
{
name:'abc'
},
{
name:'pqr'
}
];
$scope.onclick =function(){
alert('dd')
console.log($scope.c)
}
});