Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <div>{{parent.name}}</div>
  2. <div ng-repeat="child in children | filter: {id: {{parent.id}}}">
  3. {{child.name}}
  4. </div>
  5.  
  6. app.controller("parentCtrl", function($scope, $location, $routeParams, $http) {
  7. //Get parent
  8. $scope.children = [];
  9. $http.get('/children').success(function(children) {
  10. $scope.loaded = true;
  11. $scope.children = children;
  12. });
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement