docs(events): clean up confusion with Event arguments

Addresses part of https://github.com/driftyco/ionic-site/issues/544.

This PR makes it so that the piece of code in the docs works as intended. Otherwise, the second console.log statement will result in an array output, instead of the intended user object.
This commit is contained in:
William Li
2016-06-08 06:59:45 -07:00
committed by Adam Bradley
parent ccd926b8ae
commit f16a4439d9

View File

@ -17,8 +17,9 @@
* }
*
* // second page (listen for the user created event)
* events.subscribe('user:created', (user) => {
* console.log('Welcome', user);
* events.subscribe('user:created', (userEventData) => {
* // userEventData is an array of parameters, so grab our first and only arg
* console.log('Welcome', userEventData[0]);
* });
*
* ```