08 Apr 2012
<body ng-app> <div ng:controller="Main"> <ul> <li ng:repeat="item in items"> </li> </ul> </div> <script type='text/javascript'>//<![CDATA[ var source = new EventSource('/events'); function Main($scope) { $scope.items = []; source.addEventListener('right', function(e) { $scope.$apply(function() { $scope.items.push(e.data); }); },false); } //]]> </script> </body>