Hi Hassan,

Ok, You have 2 separate, but somewhat connected issues. 
Currently your msglist is making a fresh copy of the array of messages 
every time, This means, that on every invocation, (read every row in the 
table!) angalar needs to kick of an new digest cycle.. an endless loop. 
Just use the values array directly.

Your second issue is $scope.$apply. You need that only if something is 
changing data inside your view from outside angular. This means, if you 
react to server push events for example. It looks like you got that 
covered. 

If you are really want to learn Angular correctly you should not use jQuery 
while learning. If you find the need to put an ID on a tag, you are 
probably doing it wrong, and there is a better way to accomplish that. If 
you are manipulating the DOM, you are probably doing it wrong too. Angular 
apps are data-driven, not dom-driven. All dom manipulation should be in 
directives, and even there you seldom need  really need it.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to