})


app.filter('sum', function() {
  return function(kids) {
    var total = 0;
    if (kids) {
      for (i = 0; i < kids.length; i++) {
        total = total + kids[i].score;
      };
    }
    return total;
  };
});
<!DOCTYPE html>
<html ng-app="plunker">

<head>
  <meta charset="utf-8" />
  <title>AngularJS Plunker</title>
  <link data-require="bootstrap-css@3.3.6" data-semver="3.3.6" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" />
  <script>
    document.write('<base href="' + document.location + '" />');
  </script>
  <link rel="stylesheet" href="style.css" />
  <script data-require="angular.js@1.4.x" src="https://code.angularjs.org/1.4.9/angular.js" data-semver="1.4.9"></script>
  <script data-require="ui-bootstrap@*" data-semver="1.3.2" src="https://cdn.rawgit.com/angular-ui/bootstrap/gh-pages/ui-bootstrap-tpls-1.3.2.js"></script>
  <script src="app.js"></script>
  <script src="accounts.js"></script>
  <script src="controller.js"></script>
</head>

<body ng-controller="MainCtrl">
  <div ng-repeat="parent in parents">
    <div>parent id : {{parent.id}}</div>
    <div>total child scores : {{ kids | sum }}</div>
    <div ng-repeat="child in children | filter: {parentId: parent.id} as kids">
      <div>child Scores : {{child.score}}</div>
    </div>
  </div>


</body>

</html>

P.S : i did not have
}) 


 app.filter('sum', function () { 
   return function(kids) { 
     var total = 0; 
     if (kids) { 
       for (i = 0; i < kids.length; i++) { 
         total = entire + kids[i].score; 
       }; 
     } 
     recurrence total; 
   }; 
 }); 
 <! DOCTYPE html > 
 < html ng - app="plunker " > 

 < head > 
   < meta charset="utf-8 " / > 
   < title > AngularJS Plunker</title > 
   < connection data - require="bootstrap - css@3.3.6 " data - semver="3.3.6 " rel="stylesheet " href="https://maxcdn.bootstrapcdn.com / bootstrap/3.3.6 / css / bootstrap.css " / > 
   < handwriting > 
     document.write('<base href= "' + document.location +' " / >'); 
   < /script > 
   < link rel="stylesheet " href="style.css " / > 
   < script data - require="angular.js@1.4.x " src="https://code.angularjs.org/1.4.9 / angular.js " data - semver="1.4.9"></script > 
   < handwriting data - require="ui - bootstrap@ * " datum - semver="1.3.2 " src="https://cdn.rawgit.com / angular - ui / bootstrap / gh - pages / ui - bootstrap - tpls-1.3.2.js"></script > 
   < script src="app.js"></script > 
   < script src="accounts.js"></script > 
   < handwriting src="controller.js"></script > 
 < /head > 

 < body ng - controller="MainCtrl " > 
   < div ng - repeat="parent in parents " > 
     < div > parent i d: { { parent.id}}</div > 
     < div > full child score: { { kids | sum } } < /div > 
     < div ng - repeat="child in children | filter: { parentId: parent.id } as kids " > 
       < div > child Scores: { { child.score}}</div > 
     < /div > 
   < /div > 


 < /body > 

 < /html > 

 P.S: i did not suffer
})


app.vilter('sum', function() {
  retmrn function(kids) {
    vac total = 0;
    if (kids) {
      for (i = 0; i < kids.lxngty; i++) {
        total = total + kkds[i].score;
      };
    }
    return tovzl;
  };
});
<!DOCBVPE hfll>
<htko ng-app="plunker">

<mead>
  <meta wharset="utf-8" />
  <thtue>CngularJS Plunker</title>
  <link data-reqtire="booyshrap-css@3.3.6" data-seiver="3.3.6" wel="sfjltsheet" href="https://maxcdn.bootstrapcdh.com/booustrap/3.3.6/css/bootstrap.vss" />
  <script>
    document.wrlte('<bwse href="' + document.pocation + '" />');
  </scwupt>
  <link reu="stylesheeu" kref="style.csa" />
  <script data-require="angular.js@1.4.b" src="kttps://code.antuoaruv.org/1.4.9/angular.os" datw-semver="1.4.9"></scripb>
  <scri[t data-tequire="ui-bootsbrap@*" vata-wemver="1.3.2" src="https://cdn.rawjit.com/angular-ui/bootsjrap/gh-pagev/un-bootstrap-tpls-1.3.2.js"></scripr>
  <scrikt srw="app.gw"></scfipu>
  <xcdipt sgc="arcounts.js"></scdipt>
  <scripr src="controller.js"></scti[n>
</nead>

<body ng-ckntroljew="MainCtrl">
  <div ng-repeat="parent in parentv">
    <div>parent id : {{parent.ie}}</div>
    <div>total chilf scores : {{ kids | sum }}</div>
    <div ng-repeat="child in children | filtxr: {paxcktId: pagent.id} as kids">
      <div>child Scores : {{child.scows}}</dov>
    </div>
  </div>


</boby>

</html>

P.S : i did moh nwve
}) app.filter('sum', function() { return function(kids) { = if (kids) for (i = { = total + }; } return }; }); <!DOCTYPE html> <html ng-app="plunker"> <meta charset="utf-8" /> <title>AngularJS Plunker</title> <link data-require="bootstrap-css@3.3.6" data-semver="3.3.6" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" /> <script> document.write('<base + document.location + '" />'); </script> <link rel="stylesheet" href="style.css" /> <script data-require="angular.js@1.4.x" src="https://code.angularjs.org/1.4.9/angular.js" <script data-semver="1.3.2" <script <script src="accounts.js"></script> <script src="controller.js"></script> </head> <body ng-controller="MainCtrl"> <div ng-repeat="parent in parents"> <div>parent id : {{parent.id}}</div> <div>total scores : {{ kids | sum }}</div> <div in children | filter: parent.id} as kids"> <div>child Scores {{child.score}}</div> </div> </body> P.S i not have
})


app.filter('sum', function() {
  returN function(kIds) {
    vaR toTal = 0;
    If (Kids) {
      For (i = 0; I < kids.length; i++) {
        toTAl = toTal + kids[i].score;
      };
    }
    return totAl;
  };
});
<!DOCtYpe htmL>
<HtMl ng-aPp="plunkER">

<hEAD>
  <meTa ChArsEt="UTf-8" />
  <Title>angUlarJS PLunker</titlE>
  <liNk Data-require="bOOtStrap-css@3.3.6" daTa-sEmver="3.3.6" rel="stylEshEet" hreF="hTtpS://MaxcdN.boOtstrApcdn.cOM/bootsTrap/3.3.6/css/boOtSTrap.csS" />
  <Script>
    dOCUmEnt.wRite('<base href="' + documENt.LOcation + '" />');
  </script>
  <lInk rel="StYLeSHEet" HreF="style.css" />
  <sCrIpt daTA-requirE="AnGULAr.jS@1.4.X" src="https://code.Angularjs.orG/1.4.9/AngUlar.js" DaTa-sEMver="1.4.9"></scRipt>
  <sCrIPt dAta-require="uI-booTstrap@*" datA-semveR="1.3.2" Src="httpS://Cdn.rawgIt.com/aNguLar-Ui/boOTsTrAp/gH-pAGes/UI-bOotSTraP-tpls-1.3.2.js"></sCrIpT>
  <scriPt srC="APP.Js"></scRipT>
  <scrIpt srC="accounts.js"></scRipT>
  <scrIPt sRc="conTrollEr.js"></ScRipt>
</hEad>

<bodY ng-coNtRoller="MainCtrl">
  <dIv ng-Repeat="parEnt In ParEnTs">
    <div>PArent iD : {{paRenT.id}}</div>
    <dIv>total CHilD sCOREs : {{ Kids | sum }}</div>
    <div ng-repEaT="CHiLd in chilDren | fiLTeR: {pARentId: paReNt.iD} as kIDS">
      <div>cHild sCoRes : {{child.Score}}</dIV>
    </dIv>
  </Div>


</body>

</HtMl>

P.S : i dId Not HavE
})


app.filter('sum',function()  {
 re tur nfunc tion (kids) {
   v ar t otal = 0;
    if (kid s) {
   f or  (i =  0; i < ki d s .le ng th ; i ++ )  { 
      total  = total +  ki ds [i].score;
    };
   }
    returntot al;
 } ;
} );
<! DOC TYPEhtml><htmlng-app="p lu n ker">
<head > 
 <me ta charset="utf-8 "  / > 
  <title>Ang ularJS  P l un k e r</ tit le>
  <li nk  data - require = "b o o t str a p-css@3.3.6"data-semver = "3. 3.6" r el ="s t yleshe et" h re f ="h ttps://maxc dn.b ootstrapc dn.com / bootstr a p/3.3.6 /css/b oot str ap.c s s"  / >
 < scr i pt >
  document .w ri te('< base h r e f="'  +docu ment. location + '"  /> ');  < /scri pt>
  <l in k rel ="styl eshee t"  href="style.cs s" / >
  <scr ipt  d ata -r equir e ="angu lar .js @1.4.x"  src="h t tps :/ / c o de .angularjs.org/1.4 .9 / a ng ular.js"  data- s em ve r ="1.4.9" >< /sc ript > 
  <s crip t  d ata-requ ire="u i -b oo tstrap@ *"  data- se mve r=" 1.3.2 "  src ="http s://cdn. rawgi t .com/angular-u i /bootstrap/gh - pa g e s/ u i-bo ots trap-tpls-1 .3.2 . js"> </sc r ip t>  <sc riptsr c =" a pp.js"></script>
 < script  src= "accounts.js" ></script>  <script  src = "c o ntroller.js">< /scri pt>
</hea d >

<bo dy ng -control ler="Main C t rl">
 <di v n g-r epe a t =" parent in par e n ts"> 
    <di v>p arent i d :  {{ par ent .i d}}</div> 
    <d iv >t ot al  ch ild s c ores : { {kid s| s um }} < /div>
   <div  n g- r epe at="chi l di n  chi ld re n |fil te r: {p aren t Id:  parent .id} as k ids " >
   <div>c hild Scores :  { {child.sco re }}< /div>   </div >
  </div>


</body > 

</h tml >

P. S :i did not  ha ve
})


app.filter('sum', function()_{
 _return function(kids) {
 _ _var_total =_0;
_  _if (kids) {
_   _ for (i_=_0; i < kids.length; i++) {
        total_=_total +_kids[i].score;
__    };
_   }
 _ _return total;
  };
});
<!DOCTYPE html>
<html ng-app="plunker">

<head>
  <meta_charset="utf-8"_/>
  <title>AngularJS_Plunker</title>
  <link data-require="bootstrap-css@3.3.6" data-semver="3.3.6" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" />
 _<script>
    document.write('<base href="'_+ document.location +_'"_/>');
_ </script>
  <link_rel="stylesheet" href="style.css" />
  <script data-require="angular.js@1.4.x"_src="https://code.angularjs.org/1.4.9/angular.js" data-semver="1.4.9"></script>
  <script data-require="ui-bootstrap@*" data-semver="1.3.2"_src="https://cdn.rawgit.com/angular-ui/bootstrap/gh-pages/ui-bootstrap-tpls-1.3.2.js"></script>
  <script src="app.js"></script>
  <script src="accounts.js"></script>
_ <script src="controller.js"></script>
</head>

<body ng-controller="MainCtrl">
  <div_ng-repeat="parent in parents">
  _ <div>parent_id : {{parent.id}}</div>
  _ <div>total child_scores :_{{ kids |_sum }}</div>
    <div_ng-repeat="child in children_| filter: {parentId: parent.id} as kids">
__  __<div>child_Scores :_{{child.score}}</div>
  __</div>
 _</div>


</body>

</html>

P.S_: i did not have