16.07.2017 Views

AngularJS Essentials

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Be aware that depending on the size of the application, the broadcast through<br />

$rootScope may become too heavy due to the number of objects listening to the<br />

same event.<br />

Chapter 5<br />

There are a number of libraries that implement the publish and subscribe pattern<br />

in JavaScript. Of them, the most famous is AmplifyJS, but there are others such as<br />

RadioJS, ArbiterJS, and PubSubJS.<br />

Summary<br />

In this chapter, we studied what exactly $scope and $rootScope are and how the<br />

two-way data binding mechanism works. Also, we went through some of the best<br />

practices about using the scope, and we discovered its broadcasting mechanism.<br />

In the next chapter, we are going to understand how to break up our application<br />

into reusable modules.<br />

[ 113 ]<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!