I am having an object like this $scope.releases = [{name : \"All Stage\",active:true}];
I need to append more data to it
[
{name : \"
Just use the Array concat method
$scope.release = [{name : "All Stage",active:true}];
$scope.releases = [
{name : "Development",active:false},
{name : "Production",active:false},
{name : "Staging",active:false}
];
$scope.releases = $scope.releases.concat($scope.release);
user angular.extend() to extend the object angular extend
you can also use angular.merge() angular merge
$scope.releases = [{name : "All Stage",active:true}];
// Concatenate the new array onto the original
$scope.releases = $scope.releases.concat([
{name : "Development",active:false},
{name : "Production",active:false},
{name : "Staging",active:false}
]);