@@ -22,6 +22,24 @@ import {FIREBASE_PROVIDERS} from 'angularfire2';
22
22
bootstrap(App, FIREBASE_PROVIDERS);
23
23
```
24
24
25
+ ### defaultFirebase
26
+
27
+ Define the root url for the library, to resolve relative paths.
28
+
29
+ Type: ` string `
30
+
31
+ Usage:
32
+
33
+ ```
34
+ import {bootstrap} from 'angular2/core';
35
+ import {FIREBASE_PROVIDERS, defaultFirebase} from 'angularfire2';
36
+
37
+ bootstrap(App, [
38
+ FIREBASE_PROVIDERS,
39
+ defaultFirebase('https://my.firebaseio.com')
40
+ ]);
41
+ ```
42
+
25
43
### FirebaseRef
26
44
27
45
Injectable symbol to create a Firebase reference based on
@@ -42,27 +60,6 @@ class MyComponent {
42
60
}
43
61
```
44
62
45
- ### FirebaseUrl
46
-
47
- URL for the app's default Firebase database.
48
-
49
- Type: ` string `
50
-
51
- Usage:
52
-
53
- ```
54
- import {App} from './app';
55
- import {bootstrap, provide} from 'angular2/core';
56
- import {FirebaseUrl, FIREBASE_PROVIDERS} from 'angularfire2';
57
-
58
- bootstrap(App, [
59
- FIREBASE_PROVIDERS,
60
- provide(FirebaseUrl, {
61
- useValue: 'https://my.firebaseio.com'
62
- })
63
- ]);
64
- ```
65
-
66
63
### FirebaseList
67
64
68
65
A convenient provider to inject a remote list of
@@ -106,6 +103,32 @@ class QuestionsList {
106
103
}
107
104
```
108
105
106
+ ### FirebaseUrl
107
+
108
+ URL for the app's default Firebase database.
109
+
110
+ Type: ` string `
111
+
112
+ Usage:
113
+
114
+ ```
115
+ import {bootstrap, Inject} from 'angular2/core';
116
+ import {FirebaseUrl, FIREBASE_PROVIDERS, defaultFirebase} from 'angularfire2';
117
+
118
+ @Component({
119
+ selector: 'app',
120
+ template: `<a [href]="url">{{ url }}</a>`
121
+ })
122
+ class App {
123
+ constructor(@Inject(FirebaseUrl) public url: string) {}
124
+ }
125
+
126
+ bootstrap(App, [
127
+ FIREBASE_PROVIDERS,
128
+ defaultFirebase('https://my.firebaseio.com')
129
+ ]);
130
+ ```
131
+
109
132
### FirebaseListConfig
110
133
111
134
Interface for config object that can be provided to ` FirebaseList `
0 commit comments