Skip to content

Commit 31be14c

Browse files
committed
Merge pull request zafarali#4 from dolymood/patch-1
Update README.md
2 parents f7f633e + 8a604e3 commit 31be14c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ The functions/methods available to us without any further modification are:
498498
4. `.$remove()` which does a DELETE request.
499499
5. `.$delete()` which does a DELETE request.
500500
The getters and the deleters, `.get()`, `.query()`, `.$remove()` and `.$delete()` can be passed a callback function with `(value,headers)` and the error callback is passed with `httpResponse` argument.
501-
A full example of this would be `UserProfile.get({id:1}, function(data){/*do success stuff*/}, function(response){/*handle error*/}.
501+
A full example of this would be `UserProfile.get({id:1}, function(data){/*do success stuff*/}, function(response){/*handle error*/})`.
502502
The setter `.$save()` is called with some data to be posted and has the same success/error callback pattern.
503503
A full example of this would be:
504504
`Notes.$save({noteId:2, author:'Camillo'}, "This is an amazing note wow", successCallback, errorCallback)`
@@ -541,7 +541,7 @@ scope.$emit('myEventName', 'Hello', 'World');
541541
//or
542542
scope.$broadcast('myEventName', 'Bye', 'World');
543543
```
544-
What is the difference between `$emit` and `$broadcast`? As mentioned previously `$emit` propogates the event upwards and all controllers listening for `myEventName` in the parent scopes will be alerted. `$broadcast` does the opposite and propagates the event downwards. Note that both these events will also execute in their own scopes.
544+
What is the difference between `$emit` and `$broadcast`? As mentioned previously `$emit` propagates the event upwards and all controllers listening for `myEventName` in the parent scopes will be alerted. `$broadcast` does the opposite and propagates the event downwards. Note that both these events will also execute in their own scopes.
545545

546546
A new example here [08-2-onEmitBroadcast.html](https://github.com/zafarali/learning-angular/blob/master/08-2-onEmitBroadcast.html) demonstrates this. Remember that declaring a new controller automatically creates a new scope. The page is also demonstrates inherited scopes and overriding properties.
547547
I've realized that this is one of AngularJS' most powerful feature.

0 commit comments

Comments
 (0)