mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
chore(changelog): add breaking change to events in rc4 (#9693)
The documentation was updated here: cdf5dd71cd
This commit is contained in:

committed by
Brandy Carney

parent
22ba043c53
commit
f58337278d
21
CHANGELOG.md
21
CHANGELOG.md
@ -207,6 +207,27 @@ first toolbar in a footer. Adding `no-border` to the header or footer will hide
|
|||||||
be removed from any toolbars using it.
|
be removed from any toolbars using it.
|
||||||
|
|
||||||
|
|
||||||
|
#### Events
|
||||||
|
|
||||||
|
* The argument passed to the `events.subscribe(args)` function is no longer an array of parameters.
|
||||||
|
Instead, it will be called with the same parameters used in `events.publish(arg1, arg2)`
|
||||||
|
|
||||||
|
For example, the following code:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
events.subscribe('user:created', args => {
|
||||||
|
console.log('Welcome ', args[0], ' at ', args[1]);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
will now become:
|
||||||
|
|
||||||
|
```
|
||||||
|
events.subscribe('user:created', (user, time) => {
|
||||||
|
console.log('Welcome ', user, ' at ', time);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
<a name="2.0.0-rc.3"></a>
|
<a name="2.0.0-rc.3"></a>
|
||||||
# [2.0.0-rc.3](https://github.com/driftyco/ionic/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2016-11-17)
|
# [2.0.0-rc.3](https://github.com/driftyco/ionic/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2016-11-17)
|
||||||
|
Reference in New Issue
Block a user