File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,19 @@ var vm = new Vue({
57
57
})
58
58
```
59
59
60
+ If you need to access properties from the Vue instance, use the function syntax:
61
+
62
+ ``` js
63
+ var vm = new Vue ({
64
+ el: ' #demo' ,
65
+ firebase : function () {
66
+ return {
67
+ anArray: db .ref (' url/to/my/collection' )
68
+ }
69
+ }
70
+ })
71
+ ```
72
+
60
73
** About the cancelCallback** : This callback is actually an error handler that
61
74
is called if the read/write doesn't succeed. You can of course also use it with
62
75
` asObject: false ` and apply it to arrays. The firebase doc states:
@@ -68,7 +81,7 @@ is called if the read/write doesn't succeed. You can of course also use it with
68
81
69
82
``` html
70
83
<div id =" demo" >
71
- <pre >{{ anObject | json }}</pre >
84
+ <pre >{{ anObject }}</pre >
72
85
<ul >
73
86
<li v-for =" item in anArray" >{{ item.text }}</li >
74
87
</ul >
You can’t perform that action at this time.
0 commit comments