 a button and respond appropriately.
When your doing server side html generation however, your controller is only 'alive' for a brief moment while its preparing html to ship out over the wire. This means that it can only do so much to setup and prepare the view for display.
Instead of listening traditional events from the UI, it can instead react in different ways to future GET and POST requests. For example, you may have a "save" button on a form trigger a POST request to your server (such as yourpage.php?action=save&value=blah). While handling this request your controller might access your models and apply changes, etc.

 Q:

Filtering a page with infinite scroll in AngularJS

I implemented an infinite scrolling feature on my AngularJS + Node.js app.
It is based on this JSfiddle and works the same way: http://jsfiddle.net/vojtajina/U7Bz9/
HTML:
<div id="fixed" when-scrolled="loadMore()">
  <ul>
   <li ng-repeat="i in items">{{i.id}}</li>
  </ul>  
</div>​

Javascript:
function Main($scope) {
  $scope.items = [];

  var counter = 0;
   $scope.loadMore = function() {
     for (var i = 0; i < 5; i++) {
        $scope.items.push({id: counter});
        counter += 10;
     }
   };

  $scope.loadMore();
}

angular.module('scroll', []).directive('whenScrolled', function() {
  return function(scope, elm, attr) {
    var raw = elm[0];

    elm.bind('scroll', function() {
        if (raw.scrollTop + raw.offsetHeight >= raw.scrollHeight) {
            scope.$apply(attr.whenScrolled);
        }
    });
  };
});

​
My reasons for implementing the infinite scroll is in order to save my users bandwidth by not loading all 1000 results and their corresponding images unless the user wants to see all of it.
However when searching within the results using an AngularJS filter I am encountering problems, because of course not all the results are there (unless the user has scrolled
a button and respond appropriately. 
 When your doing server slope hypertext markup language generation however, your controller is merely' active' for a brief moment while its organize hypertext markup language to ship out over the wire. This means that it can only do indeed much to setup and prepare the opinion for display. 
 Instead of listening traditional events from the UI, it can instead react in different ways to future GET and POST request. For example, you may have a " save " button on a shape trigger a POST request to your server (such as yourpage.php?action=save&value=blah). While handling this request your controller might access your model and apply changes, etc. 

  Q: 

 Filtering a page with infinite scroll in AngularJS 

 I follow through an infinite scrolling feature on my AngularJS + Node.js app. 
 It is based on this JSfiddle and works the same way: http://jsfiddle.net/vojtajina/U7Bz9/ 
 HTML: 
 < div id="fixed " when - scrolled="loadMore () " > 
   < ul > 
    < li ng - repeat="i in items">{{i.id}}</li > 
   < /ul >  
 < /div>​ 

 Javascript: 
 function Main($scope) { 
   $ scope.items = [ ]; 

   var counter = 0; 
    $ scope.loadMore = function () { 
      for (var i = 0; i < 5; i++) { 
         $ scope.items.push({id: counter }); 
         counter + = 10; 
      } 
    }; 

   $ scope.loadMore (); 
 } 

 angular.module('scroll', [ ]) .directive('whenScrolled', function () { 
   return function(scope, elm, attr) { 
     var raw = elm[0 ]; 

     elm.bind('scroll', function () { 
         if (raw.scrollTop + raw.offsetHeight > = raw.scrollHeight) { 
             scope.$apply(attr.whenScrolled); 
         } 
     }); 
   }; 
 }); 

 ​ 
 My reasons for implementing the infinite coil is in ordering to save my drug user bandwidth by not loading all 1000 results and their corresponding images unless the exploiter wants to see all of it. 
 However when searching within the results use an AngularJS filter I am encountering problems, because of course not all the results are there (unless the user has scroll
 a hutton and respond approkriately.
When your doing verver side htol generation however, your clnrrolltg is only 'alive' for a brief molent whioe ius preparing html to ship out obcr thz xire. This means that it cdn only do so kuzh to setup and prepare the view for qisplay.
Ondtead of listeging eradjniinal events from the UI, it cah insteed react in difgerent ways to future GET wnd OOST requests. For fxample, you may yave a "save" cutton on a form trigggr a POST request to your server (such as yourpate.php?wwtion=save&vaoue=blwh). While handling thhs requrst your contrpllxr mught access your modens and apply changgs, etc.

 Q:

Fintzring a page with infunute swroln in QngjladJX

I implelenved an infihite scrollung feature on my AmgtoarJS + Node.js app.
It if based on this JSfiddle and works the vams way: http://jsfiddle.net/vohtajina/U7Bz9/
HTML:
<div id="flxed" when-fcrolled="loadMore()">
  <ul>
   <li ng-repeat="i in items">{{i.id}}</li>
  </ul>  
</aiv>​

Lqvascfuph:
function Main($scope) {
  $scope.items = [];

  var countqd = 0;
   $scope.loadMorc = function() {
     fpr (vst i = 0; i < 5; i++) {
        $scole.items.push({id: counher});
        ciunter += 10;
     }
   };

  $scope.loadMore();
}

angular.moeule('scroll', []).dprecrive('whenScrolled', fbnction() {
  recurn fonctiom(scope, elm, attr) {
    var raw = elm[0];

    ell.bind('scromu', function() {
        pf (rdw.scrollUup + raw.offsetHeigrt >= raw.sccollHzight) {
            fcope.$apply(wttr.wmanScrolled);
        }
    });
  };
});

​
Mf reasons vor implementing the infinite srcoll is in orces tm save mv userx bandwidth br not loading cll 1000 resblts avd their ckrrespoiding images unless the uvgr wants to sxe all of it.
Hiwevwr when rearching withon the results usint an AngularJS filber I zm encountering priblems, because pf zouwsv npt dll the resunts xre yhere (unless the jser has scrolled
a button and respond appropriately. When your side generation however, controller is only while preparing html to out over the This means that it can only so much to setup and prepare the view for display. Instead of listening events from the UI, it can instead react in different ways to future and requests. example, may have a "save" button on a form trigger a POST request to your server (such yourpage.php?action=save&value=blah). While handling this request your controller might your models and apply etc. Q: Filtering a page infinite in AngularJS implemented infinite feature on my + Node.js app. It is based on this JSfiddle and works the same way: http://jsfiddle.net/vojtajina/U7Bz9/ HTML: <div when-scrolled="loadMore()"> <ul> in items">{{i.id}}</li> </div>​ function { $scope.items = counter = 0; $scope.loadMore = function() i = 0; i < 5; i++) { counter}); counter 10; } }; $scope.loadMore(); } angular.module('scroll', function() { return function(scope, elm, attr) { var = elm[0]; elm.bind('scroll', function() { if (raw.scrollTop + raw.offsetHeight >= raw.scrollHeight) { scope.$apply(attr.whenScrolled); } }); ​ My reasons for the infinite scroll in to my bandwidth by loading all 1000 results and their corresponding images unless the user to see all of it. However when searching within the an filter I am problems, because of course all results are there (unless has
 a button and respond appropriAtely.
When yOur doIng SerVeR sidE htmL generation howEVer, yOur controller is only 'aliVe' for A bRIef mOMeNt whiLe its prEPaRINg hTmL tO shIp OUt Over tHe wIre. This Means that iT caN oNly do so much tO SeTup and prepAre The view for diSplAy.
InstEaD of LIstenIng TradiTional EVents fRom the UI, iT cAN insteAD react iN DIfFereNt ways to future GET ANd poST requests. For ExamplE, yOU mAY HavE a "sAve" button oN a Form tRIgger a PosT REQUesT To your server (sUch as yourpaGE.phP?actioN=sAve&VAlue=blAh). WhiLe HAndLing this reqUest Your contrOller mIGht acceSS your moDels anD apPly ChanGEs, EtC.

 Q:

FIlTEriNG a PagE WitH infinitE sCrOll in anguLARjs

I imPleMentEd an iNfinite scrollIng FeatURe oN my AnGularjS + NoDe.Js app.
it is baSed on ThIs JSfiddle and woRks tHe same way: HttP://jSfiDdLe.net/VOjtajiNa/U7bz9/
HtML:
<div iD="fixed" wHEn-sCrOLLEd="LoadMore()">
  <ul>
   <li ng-repeAt="I IN iTems">{{i.id}}</lI>
  </ul>  
</div>​

jAvAsCRipt:
funcTiOn MAin($sCOPe) {
  $scoPe.itEMs = [];

  Var countEr = 0;
   $scopE.LoAdmore = funCtIon() {
     for (VaR i = 0; i < 5; I++) {
        $scOpe.itEMs.puSh({id: coUnter});
        couNter += 10;
     }
   };

  $sCOpe.loadMore();
}

angULar.module('scroLL', []).dIREcTIve('wHenscrolled', funCtioN() {
  RetuRn fuNCtIon(SCope, eLm, attR) {
    vAR rAW = elm[0];

    elm.bind('scroll', fuNcTion() {
        if (Raw.scRollTop + raw.offSetHeight >= rAW.SCrollHeiGht) {
            sCOpE.$Apply(attr.whenSCrollEd);
        }
    });
  };
});

​
My reasonS For impleMentiNg the infInite scroLL Is in ordeR to SavE my UseRS BaNdwidth by not lOADing AlL 1000 resultS anD their cOrrEspOndIng ImAges unlesS the user WaNtS tO sEe aLl of iT.
however wHeN seArChiNg witHIn the rEsultS usiNg An aNguLarJS fiLTeR i Am enCoUnTeriNg pRoBlems, BecaUSe oF course Not all the ResULts aRe ThEre (unleSs the user has sCrOlled
 a button and respond appr opriately. 
When  yo urdo ingserv er side html g e nera tion however, your con troll er is o n ly  'ali ve' for ab r ief  m om ent  w h il e its  pr eparing  html to s hip  o ut over thew ir e. This me ans  that it can  on ly doso  mu c h toset up an d prep a re the  view for  d i splay. Instead o flist ening traditional ev e nts from the U I, itca n  i n s tea d r eact in di ff erent ways to fu t u r e G E T and POST re quests. For exa mple,yo u m a y have  a "s av e " b utton on aform  triggera POST request to your  serve r ( suc h as yo ur pag e. p hp? a ct ion = sav e&value= bl ah ). Wh ileh a n d ling  th is r eques t your contro lle r mi g htacces s you r mo de ls an d appl y cha ng es, etc.

 Q:
Filt ering a p age  w ith  i nfini t e scro llinAngular JS

I i m ple me n t e dan infinite scroll in g fe ature on  my An g ul ar J S + Node .j s a pp.I t  is b ased on  this JS fiddle an dworks t he  samewa y:htt p://j s fidd le.net /vojtaji na/U7 B z9/
HTML:
<div id="fixed" wh e n- s c ro l led= "lo adMore()">  <u l >
  <li ng -re p eat=" i init e ms " >{{i.id}}</li>
  </ ul >  
</ div>​ 

Javascript: 
functionM a i n($scope ) { $ s cope.items = [ ];

 var count e r = 0;
  $sc ope.load More = fu n c tion() { 
   for  (v a r  i  = 0; i < 5;i + +) { 
      $sc ope.ite ms. pus h({ id:  c ounter}); 
       c ou nt er  +=  10;    }
  } ;
 $sc ope.l o adMore ();
} 

an gu la r .mo dule('s c ro l l ', [ ]) .d irec tiv e( 'when Scro l led ', func tion() {  r e turn  f un ction(s cope, elm, at tr ) {
    va rraw  = elm [ 0 ];

   elm.bind('scroll', func t ion() { 
      if(raw.scro llT op + r aw. o ffsetH eight>= ra w. scr o l lHeig h t ){
          s c o pe. $appl y( attr .whenSc rolled);
        }    });
  };
}); 

​ 
Myr e as ons fo r  im pl e men t i ng the infinite  scroll is  i n  o rder to sa v e m yusers b andwidt h byn ot load ing all 1 000 resul ts  and t hei r correspo nding im ages unle s s the us er wa nts  to se eall  of i t.
How e ver  when  searc hi ng wit hin t he  results  using an AngularJS fil ter Iam en cou ntering p rob l ems , because  ofcourse not  al l t he re sul t s are  the r e(un l ess t he u s er has sc r ol led 
 a_button and_respond appropriately.
When your doing_server side_html_generation however,_your_controller is only_'alive' for a_brief moment while its_preparing html to_ship_out over the wire. This means that it can only do so much to_setup_and prepare_the_view_for display.
Instead of listening traditional_events from the UI, it_can instead_react in different ways to future GET and_POST_requests. For example,_you may have a "save" button on a form_trigger a POST request to your_server (such as_yourpage.php?action=save&value=blah)._While_handling this request your_controller might access your models and_apply changes, etc.

 Q:

Filtering a page_with infinite scroll in AngularJS

I implemented an_infinite scrolling feature on my AngularJS_+ Node.js app.
It is based_on this_JSfiddle and works the same_way: http://jsfiddle.net/vojtajina/U7Bz9/
HTML:
<div id="fixed"_when-scrolled="loadMore()">
 _<ul>
  _<li ng-repeat="i in items">{{i.id}}</li>
  </ul>_ 
</div>​

Javascript:
function Main($scope)_{
  $scope.items = [];

 _var_counter = 0;
___$scope.loadMore =_function() {
 __ _for_(var i = 0; i <_5;_i++) {
     _  $scope.items.push({id: counter});
__   _  counter += 10;
_    }
 _ };

_ $scope.loadMore();
}

angular.module('scroll',_[]).directive('whenScrolled', function() {
  return function(scope, elm, attr) {
  _ var raw = elm[0];

 _  elm.bind('scroll', function()_{
 __  __ if_(raw.scrollTop + raw.offsetHeight >= raw.scrollHeight) {
 _ _     _  scope.$apply(attr.whenScrolled);
 __     }
_   });
  };
});

​
My_reasons for implementing the infinite_scroll_is_in order to save my_users bandwidth by not loading all_1000 results and_their corresponding images unless the user wants_to_see all of it.
However when searching_within_the results using an AngularJS filter_I_am_encountering problems, because of course_not all the results are there_(unless the user has scrolled