Last Updated: February 25, 2016
·
776
· xiujunma

AngularJs and Atmosphere

var QuotesController = function ($scope, $rootScope) {
    $scope.quotes = finance.cache.quotes;
    listeners.quote.push(function (quote) {
        $scope.$apply(function () {
            $scope.quotes[quote.productId] = quote;
        });

        $rootScope.$broadcast('quote', quote);
    });
};

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Related Tags
#angularjs
Did you know?

AngularJS pages are long-lived browser apps with the same script risk as a newer single-page app. Third-party code in the template can read forms and values rendered on the page.

Security insights from Cside