Skip to content

Instantly share code, notes, and snippets.

@lanekatris
Created October 26, 2015 23:41
Show Gist options
  • Select an option

  • Save lanekatris/4d050cb8a3c7c12b932d to your computer and use it in GitHub Desktop.

Select an option

Save lanekatris/4d050cb8a3c7c12b932d to your computer and use it in GitHub Desktop.
var data = [
{ refNum: 'a1', items: [{name: 'item 1'}, {name: 'item 2'}] },
{ refNum: 'b4', items: [{name: 'item 3'}, {name: 'item 4'}] }
];
var items = [];
$scope.$watch('data',function ( nv, ov ) {
angular.forEach(nv, function ( item ) {
items.push(item);
});
});
// ng-repeat in html over items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment