Skip to content

Commit bd3100f

Browse files
mornirposva
authored andcommitted
Mentioned callback functions for manual binding (#106)
* Mentioned callback functions for manual binding With an short example to remind of using 'null' as a third argument if only readyCallback is wanted. * Create README.md
1 parent 62b588b commit bd3100f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ Alternatively, you can also manually bind to a Firebase ref with the `$bindAsObj
101101
``` js
102102
vm.$bindAsObject('user', myFirebaseRef.child('user'))
103103
vm.$bindAsArray('items', myFirebaseRef.child('items').limitToLast(25))
104+
// You can also pass cancelCallback and readyCallback callbacks functions as
105+
// a third and fourth arguments. Any of them can be omitted by passing null
106+
vm.$bindAsObject('user', myFirebaseRef.child('user'), null, () => console.log('Ready fired!'))
104107

105-
// References are unbinded when the component is destroyed but you can manually unbind a reference
108+
// References are unbound when the component is destroyed but you can manually unbind a reference
106109
// if needed
107110
vm.$unbind('items')
108111
```

0 commit comments

Comments
 (0)