I'm currently working on an AngularJS application where I receive dynamic values from the backend in the form of a list ($scope.list
). During the iteration of this list using forEach
, I would like to add a dummy element.
To better illustrate this scenario, I have created a demo Plunker: https://plnkr.co/edit/XFFYAKEd6gPuL2JAWCbD?p=preview
In the provided demo Plunker, I have initialized a $scope.list and my goal is to incorporate an additional element while iterating through the list (e.g.
{id:'1900',firstname: 'dummyElement', lastname: 'D'}
). Any suggestions or feedback on how to achieve this?