You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-66Lines changed: 38 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1094,90 +1094,62 @@ And the following partial:
1094
1094
### Observer Pattern as an External Service
1095
1095
1096
1096
##### About
1097
-
Below is an example taken from https://github.com/greglbd/angular-observer-pattern. This is an angular factory which reflects the Observer Pattern. It works well with the ControllerAs method of working as it can be much more efficient that $scope.$watch and more specific to a unique scope or object than $emit and $broadcast when used correctly.
1098
1097
1099
-
**Use Case:** You would use this pattern to communicate between 2 controllers that use the same model but are not connected in anyway
1098
+
Below is an example taken from [here](https://github.com/greglbd/angular-observer-pattern). This is an angular factory which creates a service implementing the Observer Pattern. It works well with the ControllerAs method of working as it can be much more efficient that `$scope.$watch` and more specific to a unique scope or object than $emit and $broadcast when used correctly.
1100
1099
1101
-
##### Methods
1102
-
1103
-
function adds a listener to an event with a callback which is stored against the event with it's corresponding id.
0 commit comments