I have a ng-repeat
to loop my object value to view.
Then I want to have a button to add new blank element to the last of ng-repeat
value.
How can I do this in angular?
My data is json object. I tried
In controller
$scope.objs = {'a': 'a', 'b':'b'};
In view
{{Object.keys(objs).length}};
But nothing show in view.
Update
<div ng-repeat="docstep in docs.docsteps" class="docstep">
{{docstep.text}}
</div>
Then I want to get the length of objects so I can .length + 1 in the button click But I have no idea how to get objects length. Or is there any better idea?