You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/DATABASE.md
+2-14Lines changed: 2 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,26 +11,14 @@ Since this is the most likely feature you'll use with this plugin it has already
11
11
## Functions
12
12
13
13
### init
14
-
Optionally you can pass `persist` to the `init` function to make Firebase save data to the local disc so it will work in offline scenario's. Defaul false.
14
+
You can optionally pass `persist` to the `init` function to make Firebase save data to the local disc so it will work in offline scenario's. Default `false`.
15
15
16
16
```js
17
-
var firebase =require("nativescript-plugin-firebase");
18
-
19
17
firebase.init({
20
18
persist:true
21
-
}).then(
22
-
function (instance) {
23
-
console.log("firebase.init done");
24
-
},
25
-
function (error) {
26
-
console.log("firebase.init error: "+ error);
27
-
}
28
-
);
19
+
});
29
20
```
30
21
31
-
All further examples assume `firebase` has been required.
32
-
Also, all functions support promises, but we're leaving out the `.then()` stuff for brevity where it doesn't add value.
33
-
34
22
### setValue
35
23
Data is stored as JSON data at a specific path (which is appended to the URL you passed to `init`).
36
24
If you want to add data to a known path use this, otherwise use `push` (see below).
0 commit comments