Skip to content

Commit ff8c85b

Browse files
committed
Merge pull request toddmotto#18 from kentcdodds/patch-3
Improve accuracy about $rootScope.on listeners
2 parents 29bba03 + e5abf91 commit ff8c85b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ A standardised approach for developing AngularJS applications in teams. This sty
539539
$rootScope.$emit('customEvent', data);
540540
```
541541
542-
- Hint: `$rootScope.$on` listeners are different from `$scope.$on` listeners and will always persist, so they need destroying when the relevant `$scope` fires the `$destroy` event
542+
- Hint: Because the `$rootScope` is never destroyed, `$rootScope.$on` listeners aren't either, unlike `$scope.$on` listeners and will always persist, so they need destroying when the relevant `$scope` fires the `$destroy` event
543543

544544
```javascript
545545
// call the closure

0 commit comments

Comments
 (0)