@@ -22,7 +22,7 @@ limitations under the License.
2222# Event Dispatching in Angular
2323
2424<br />
25- AngularJS provides an Event dispatching system allow the communication between controllers or services and controllers.
25+ AngularJS provides an Event dispatching system allowing the communication between controllers or services and controllers.
2626
2727` $broadcast ` dispatches the event downwards through the child scopes
2828
@@ -44,9 +44,9 @@ $scope.$on('eventToCatch', function);
4444$rootScope.$on('eventToCatch', function);
4545```
4646
47- Now, there is a few things to know about using it from ` $rootScope ` :
47+ Now, there are a few things to know about using it from ` $rootScope ` :
4848
49- * Both ` $rootScope.$emit ` and ` $rootScope.$broadcast ` go through child scopes since ` $rootScope ` do not have a parent
49+ * Both ` $rootScope.$emit ` and ` $rootScope.$broadcast ` go through child scopes since ` $rootScope ` doesn't have a parent
5050* ` $rootScope.$emit ` can only be received by ` $rootScope.$on `
5151* ` $rootScope.$broadcast ` can be received by ` $rootScope.$on ` and ` $scope.$on `
5252* ` $rootScope.$on ` listener needs to be removed by hand (Memory leak if forgotten)
@@ -60,7 +60,7 @@ Now, there is a few things to know about using it from `$rootScope`:
6060
6161#### Performances
6262
63- Using ` $broadcast ` might seem not optimum if we consider the description we have above.
63+ Using ` $broadcast ` might not seem optimum if we consider the description we have above.
6464
6565However it is optimized to only go through branches that have a matching event binding.
6666(cf. [ this post] ( http://www.bennadel.com/blog/2724-scope-broadcast-is-surprisingly-efficient-in-angularjs.htm ) )
0 commit comments