ng-repeat not updating after updating $rootScope
<p>How do I make ng-repeat update the view correctly after receiving data via socket.io</p>

<p>I've verified that $rootScope is updating but my views inside of ng-repeat are not showing me the new data. </p>

<p>here is what my notification looks like, I'm receiving data via socket.io</p>

<pre><code>notifications:function(){
            if($rootScope.$storage.satellizer_token){
                var socket = io(document.domain+':3000', {query: "Authorization="+$rootScope.$storage.satellizer_token});
                if($rootScope.$storage['ngStorage-userData']){
                    var user = JSON.parse($rootScope.$storage['ngStorage-userData']).id;
                    $rootScope.openSockets.push('notifications');
                    socket.on('userNotifications.'+ user+':App\\Events\\notifications', function(message){
                        var m = JSON.parse(message);
                        var n = JSON.parse(m.data.message);
                        //console.log(n.type);
                        $rootScope.notifications[n.type].items.push(n);
                        $rootScope.notifications[n.type].unread++;

                        $rootScope.$apply(function(){
                            console.log('scope updated');
                        });
                    });
                }
            }
        }
</code></pre>

<p>My view is set up in the following way </p>

<pre><code>li.dropdown.dropdown-list(uib-dropdown="")
    a(uib-dropdown-toggle="" md-ink-ripple="")
        em.fa(ng-class="'fa-'+notifications.HelpDesk.icon")
        .label.label-danger(ng-if="notifications.HelpDesk.unread &gt; 0") {{notifications.HelpDesk.unread}}
    ul.dropdown-menu(class="animated flipInX")
        li(ng-repeat="item in notifications.HelpDesk.items | limitTo:10" ng-if="item.read == 0")
            // START list group
            .list-group
                // list item
                a.list-group-item
                    .media-box
                        .pull-left
                            em.fa.fa-2x.text-info(ng-class='"fa-"+item.icon')
                        .media-box-body.clearfix
                            p.m0 {{item.title}}
                            p.m0.text-muted: small {{item.content}}
                a.list-group-item(href='' ng-if="notifications.HelpDesk.items.length == 0")
                    .media-box
                        .pull-left
                            em.fa(ng-class="'fa-'+notifications.HelpDesk.icon")
                        .media-box-body.clearfix
                            small No unread notifications.
                a.list-group-item(href='' ng-if="notifications.HelpDesk.items.length &gt; 10")
                    small More notifications
                    .label.label-success.pull-right {{notifications.HelpDesk.items.length - 10}}
</code></pre>

<p>As you can see I'm just using a simple ng-repeat  directive to spit out data from a json object. </p>

<p>the model is updating this value in the dom <code>notifications.HelpDesk.unread</code> but not anything inside <code>li(ng-repeat="item in notifications.HelpDesk.items | limitTo:10" ng-if="item.read == 0")</code></p>

<p>My factory looks like the following</p>

<pre><code>(function() {
'use strict';

angular
    .module('app.notifications')
    .factory('Notifications', Notifications);
Notifications.$inject = ['$http','$rootScope'];
function Notifications($http,$rootScope) {
    return {
        load:function(){
            $rootScope.notifications = {
                All:{
                    "label":"All",
                    "icon":"bell",
                    "unread":0,
                },
                Alert:{
                    "label":"Alerts",
                    "icon":"exclamation-triangle",
                    "items":[],
                    "unread":0,
                },
                HelpDesk:{
                    "label":"Help Desk",
                    "icon":"life-ring",
                    "items":[],
                    "unread":0,
                    "sref":"app.helpDesk"
                },
                Message:{
                    "label":"Messages",
                    "icon":"inbox",
                    "items":[],
                    "unread":0,
                    "sref":"app.message-center"
                }
            };
            this.list().then(function(res){
                if(res){
                    if(res.status === 200){
                        angular.forEach(res.data,function(value,key){
                            if(!value.read){
                                $rootScope.notifications[value.type].unread++;
                                $rootScope.notifications.All.unread++;
                            }
                            $rootScope.notifications[value.type].items.push(value);

                        });
                    }
                }

            });
        },
        list:function(){
            return $http.get('api/notifications');
        }
    }
 }
})();
</code></pre>