Skip to content

Commit 91ec37e

Browse files
authored
chore(): release @angular/fire 5.0 πŸŽ‰πŸ”₯πŸ•Ί (#1854)
1 parent 396e762 commit 91ec37e

File tree

94 files changed

+221
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+221
-200
lines changed

β€ŽCHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
<a name="5.0.0"></a>
2+
# [5.0.0](https://github.com/angular/angularfire2/compare/5.0.0-rc.12...5.0.0) (2018-09-04)
3+
4+
5+
### Bug Fixes
6+
7+
* **firestore:** Better handle enablePersistence failures, esp. for Universal ([#1850](https://github.com/angular/angularfire2/issues/1850)) ([334ba7b](https://github.com/angular/angularfire2/commit/334ba7b))
8+
* **firestore:** Add document `get()`, the options argument for `get()` should be optional, and subscriptions to `get()` should be run in the Angular Zone([#1849](https://github.com/angular/angularfire2/issues/1849)) ([185943f](https://github.com/angular/angularfire2/commit/185943f))
9+
10+
11+
### Breaking changes
12+
13+
5.0 is now final and we're published under `@angular/fire`.
14+
15+
```bash
16+
npm i --save firebase @angular/fire
17+
```
18+
19+
120
<a name="5.0.0-rc.12"></a>
221
# [5.0.0-rc.12](https://github.com/angular/angularfire2/compare/5.0.0-rc.11...5.0.0-rc.12) (2018-08-24)
322

β€ŽREADME.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
[![Build Status](https://travis-ci.org/angular/angularfire2.svg?branch=master)](https://travis-ci.org/angular/angularfire2) [![Join the chat at https://gitter.im/angular/angularfire2](https://badges.gitter.im/angular/angularfire2.svg)](https://gitter.im/angular/angularfire2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
77

8-
Status: Release candidate
9-
108
## What is AngularFire?
119

1210
- **Observable based** - Use the power of RxJS, Angular, and Firebase.
@@ -27,14 +25,14 @@ Status: Release candidate
2725
## Install
2826

2927
```bash
30-
npm install firebase angularfire2 --save
28+
npm install firebase @angular/fire --save
3129
```
3230

3331
## Example use:
3432

3533
```ts
3634
import { Component } from '@angular/core';
37-
import { AngularFirestore } from 'angularfire2/firestore';
35+
import { AngularFirestore } from '@angular/fire/firestore';
3836
import { Observable } from 'rxjs';
3937

4038
@Component({

β€Ždocs/auth/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ the Firebase docs for more information on what methods are available.](https://f
1010

1111
```ts
1212
import { Component } from '@angular/core';
13-
import { AngularFireAuth } from 'angularfire2/auth';
13+
import { AngularFireAuth } from '@angular/fire/auth';
1414
import { auth } from 'firebase';
1515

1616
@Component({

β€Ždocs/firestore/collections.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The `AngularFirestoreCollection` service is a wrapper around the native Firestor
99

1010
```ts
1111
import { Component } from '@angular/core';
12-
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
12+
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
1313
import { Observable } from 'rxjs';
1414

1515
export interface Item { name: string; }
@@ -87,7 +87,7 @@ There are multiple ways of streaming collection data from Firestore.
8787

8888
```ts
8989
import { Component } from '@angular/core';
90-
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
90+
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
9191
import { Observable } from 'rxjs';
9292

9393
export interface Item { id: string; name: string; }
@@ -138,7 +138,7 @@ export class AppComponent {
138138

139139
```ts
140140
import { Component } from '@angular/core';
141-
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
141+
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
142142
import { Observable } from 'rxjs';
143143
import { map } from 'rxjs/operators';
144144

@@ -186,7 +186,7 @@ export class AppComponent {
186186

187187
```ts
188188
import { Component } from '@angular/core';
189-
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
189+
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
190190
import { Observable } from 'rxjs';
191191
import { map } from 'rxjs/operators';
192192

@@ -231,7 +231,7 @@ export class AppComponent {
231231

232232
```ts
233233
import { Component } from '@angular/core';
234-
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
234+
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
235235
import { Observable } from 'rxjs';
236236
import { map } from 'rxjs/operators';
237237

@@ -281,7 +281,7 @@ There are three `DocumentChangeType`s in Firestore: `added`, `removed`, and `mod
281281

282282
```ts
283283
import { Component } from '@angular/core';
284-
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
284+
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
285285
import { Observable } from 'rxjs';
286286

287287
@Component({

β€Ždocs/firestore/documents.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The `AngularFirestoreDocument` service is a wrapper around the native Firestore
99

1010
```ts
1111
import { Component } from '@angular/core';
12-
import { AngularFirestore, AngularFirestoreDocument } from 'angularfire2/firestore';
12+
import { AngularFirestore, AngularFirestoreDocument } from '@angular/fire/firestore';
1313
import { Observable } from 'rxjs';
1414

1515
export interface Item { name: string; }

β€Ždocs/firestore/offline-data.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ To enable offline persistence in your AngularFire application, call `enablePersi
1212
import { BrowserModule } from '@angular/platform-browser';
1313
import { NgModule } from '@angular/core';
1414
import { AppComponent } from './app.component';
15-
import { AngularFireModule } from 'angularfire2';
16-
import { AngularFirestoreModule } from 'angularfire2/firestore';
17-
import { AngularFireAuthModule } from 'angularfire2/auth';
15+
import { AngularFireModule } from '@angular/fire';
16+
import { AngularFirestoreModule } from '@angular/fire/firestore';
17+
import { AngularFireAuthModule } from '@angular/fire/auth';
1818
import { environment } from '../environments/environment';
1919

2020
@NgModule({

β€Ždocs/firestore/querying-collections.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ size$.next('small');
8383

8484
```ts
8585
import { Component } from '@angular/core';
86-
import { AngularFirestore } from 'angularfire2/firestore';
86+
import { AngularFirestore } from '@angular/fire/firestore';
8787
import { Observable, BehaviorSubject, combineLatest } from 'rxjs';
8888
import { switchMap } from 'rxjs/operators';
8989

β€Ždocs/install-and-setup.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You should see a message on the page that says *App works!*
3131
### 3. Install AngularFire and Firebase
3232

3333
```bash
34-
npm install angularfire2 firebase --save
34+
npm install @angular/fire firebase --save
3535
```
3636

3737
Now that you have a new project setup, install AngularFire and Firebase from npm.
@@ -62,7 +62,7 @@ Open `/src/app/app.module.ts`, inject the Firebase providers, and specify your F
6262
import { BrowserModule } from '@angular/platform-browser';
6363
import { NgModule } from '@angular/core';
6464
import { AppComponent } from './app.component';
65-
import { AngularFireModule } from 'angularfire2';
65+
import { AngularFireModule } from '@angular/fire';
6666
import { environment } from '../environments/environment';
6767

6868
@NgModule({
@@ -110,10 +110,10 @@ For example if your application was using both Firebase authentication and the F
110110
import { BrowserModule } from '@angular/platform-browser';
111111
import { NgModule } from '@angular/core';
112112
import { AppComponent } from './app.component';
113-
import { AngularFireModule } from 'angularfire2';
114-
import { AngularFirestoreModule } from 'angularfire2/firestore';
115-
import { AngularFireStorageModule } from 'angularfire2/storage';
116-
import { AngularFireAuthModule } from 'angularfire2/auth';
113+
import { AngularFireModule } from '@angular/fire';
114+
import { AngularFirestoreModule } from '@angular/fire/firestore';
115+
import { AngularFireStorageModule } from '@angular/fire/storage';
116+
import { AngularFireAuthModule } from '@angular/fire/auth';
117117
import { environment } from '../environments/environment';
118118

119119
@NgModule({
@@ -136,7 +136,7 @@ Open `/src/app/app.component.ts`, and make sure to modify/delete any tests to ge
136136

137137
```ts
138138
import { Component } from '@angular/core';
139-
import { AngularFirestore } from 'angularfire2/firestore';
139+
import { AngularFirestore } from '@angular/fire/firestore';
140140

141141
@Component({
142142
selector: 'app-root',
@@ -156,7 +156,7 @@ In `/src/app/app.component.ts`:
156156

157157
```ts
158158
import { Component } from '@angular/core';
159-
import { AngularFirestore } from 'angularfire2/firestore';
159+
import { AngularFirestore } from '@angular/fire/firestore';
160160
import { Observable } from 'rxjs';
161161

162162
@Component({

β€Ždocs/ionic/authentication.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Go to [Firebase console](https://console.firebase.google.com/) then click **Add
4646
at `login.service.ts` add this function:
4747
```ts
4848

49-
import { AngularFireAuth } from 'angularfire2/auth';
49+
import { AngularFireAuth } from '@angular/fire/auth';
5050
import firebase from 'firebase/app';
5151
import AuthProvider = firebase.auth.AuthProvider;
5252

β€Ždocs/ionic/cli.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Your default browser should start up and display a working Ionic app.
3636
### 3. Install AngularFire 2 and Firebase
3737

3838
```bash
39-
npm install angularfire2 firebase --save
39+
npm install @angular/fire firebase --save
4040
```
4141

4242
Now that you have a new project setup, install AngularFire and Firebase from npm.
@@ -69,7 +69,7 @@ import { NgModule } from '@angular/core';
6969
import { IonicApp, IonicModule } from 'ionic-angular';
7070
import { MyApp } from './app.component';
7171

72-
import { AngularFireModule } from 'angularfire2';
72+
import { AngularFireModule } from '@angular/fire';
7373
import { firebaseConfig } from '../environment';
7474

7575
@NgModule({
@@ -122,10 +122,10 @@ import { NgModule } from '@angular/core';
122122
import { IonicApp, IonicModule } from 'ionic-angular';
123123
import { MyApp } from './app.component';
124124

125-
import { AngularFireModule } from 'angularfire2';
125+
import { AngularFireModule } from '@angular/fire';
126126
import { firebaseConfig } from '../environment';
127-
import { AngularFireDatabaseModule } from 'angularfire2/database';
128-
import { AngularFireAuthModule } from 'angularfire2/auth';
127+
import { AngularFireDatabaseModule } from '@angular/fire/database';
128+
import { AngularFireAuthModule } from '@angular/fire/auth';
129129

130130

131131
@NgModule({
@@ -149,7 +149,7 @@ Open `/src/pages/home/home.ts`, and start to import `AngularFireDatabase` and `F
149149
```ts
150150
import { Component } from '@angular/core';
151151
import { NavController } from 'ionic-angular';
152-
import { AngularFireDatabase } from 'angularfire2/database';
152+
import { AngularFireDatabase } from '@angular/fire/database';
153153
import { Observable } from 'rxjs/Observable';
154154

155155
@Component({
@@ -173,7 +173,7 @@ In `/src/pages/home/home.ts`:
173173
```ts
174174
import { Component } from '@angular/core';
175175
import { NavController } from 'ionic-angular';
176-
import { AngularFireDatabase } from 'angularfire2/database';
176+
import { AngularFireDatabase } from '@angular/fire/database';
177177
import { Observable } from 'rxjs/Observable';
178178

179179
@Component({

β€Ždocs/ionic/v3.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ import { StatusBar } from '@ionic-native/status-bar';
198198
import { MyApp } from './app.component';
199199
import { HomePage } from '../pages/home/home';
200200

201-
import { AngularFireModule } from 'angularfire2';
202-
import { AngularFireDatabaseModule, AngularFireDatabase } from 'angularfire2/database';
203-
import { AngularFireAuthModule } from 'angularfire2/auth';
201+
import { AngularFireModule } from '@angular/fire';
202+
import { AngularFireDatabaseModule, AngularFireDatabase } from '@angular/fire/database';
203+
import { AngularFireAuthModule } from '@angular/fire/auth';
204204

205205
export const firebaseConfig = {
206206
apiKey: "xxxxxxxxxx",
@@ -256,7 +256,7 @@ Your `home.ts` file should look like this:
256256
import { Component } from '@angular/core';
257257
import { NavController } from 'ionic-angular';
258258

259-
import { AngularFireDatabase } from 'angularfire2/database';
259+
import { AngularFireDatabase } from '@angular/fire/database';
260260
import { Observable } from 'rxjs/Observable';
261261

262262
@Component({
@@ -369,7 +369,7 @@ The `home.ts` should look like below
369369
import { Component } from '@angular/core';
370370
import { NavController } from 'ionic-angular';
371371

372-
import { AngularFireAuth } from 'angularfire2/auth';
372+
import { AngularFireAuth } from '@angular/fire/auth';
373373
import firebase from 'firebase/app';
374374

375375
@Component({
@@ -398,7 +398,7 @@ export class HomePage {
398398

399399
Also, update your `app.module.ts` to contain following import
400400

401-
`import { AngularFireAuthModule } from 'angularfire2/auth';`
401+
`import { AngularFireAuthModule } from '@angular/fire/auth';`
402402

403403
and add it to the imports array.
404404

@@ -422,7 +422,7 @@ Your `home.ts` should look as follows:
422422
import { Component } from '@angular/core';
423423
import { NavController } from 'ionic-angular';
424424

425-
import { AngularFireAuth } from 'angularfire2/auth';
425+
import { AngularFireAuth } from '@angular/fire/auth';
426426
import firebase from 'firebase/app';
427427

428428
@Component({
@@ -580,7 +580,7 @@ Your `home.ts` should look as below:
580580
import { Component } from '@angular/core';
581581
import { NavController } from 'ionic-angular';
582582

583-
import { AngularFireAuth } from 'angularfire2/auth';
583+
import { AngularFireAuth } from '@angular/fire/auth';
584584
import firebase from 'firebase/app';
585585

586586
import { Platform } from 'ionic-angular';
@@ -643,9 +643,9 @@ import { StatusBar } from '@ionic-native/status-bar';
643643
import { MyApp } from './app.component';
644644
import { HomePage } from '../pages/home/home';
645645

646-
import { AngularFireModule } from 'angularfire2';
647-
import { AngularFireDatabaseModule } from 'angularfire2/database';
648-
import { AngularFireAuthModule } from 'angularfire2/auth';
646+
import { AngularFireModule } from '@angular/fire';
647+
import { AngularFireDatabaseModule } from '@angular/fire/database';
648+
import { AngularFireAuthModule } from '@angular/fire/auth';
649649
import { Facebook } from '@ionic-native/facebook';
650650

651651
export const firebaseConfig = {

β€Ždocs/rtdb/lists.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Replace your `/src/app/app.component.ts` from previous step to look like below.
1717

1818
```ts
1919
import { Component } from '@angular/core';
20-
import { AngularFireDatabase } from 'angularfire2/database';
20+
import { AngularFireDatabase } from '@angular/fire/database';
2121

2222
@Component({
2323
selector: 'app-root',
@@ -46,11 +46,11 @@ To get the list in realtime, create a list binding as a property of your compone
4646

4747
Then in your template, you can use the `async` pipe to unwrap the binding.
4848

49-
Update `/src/app/app.component.ts` to import `AngularFireList` from angularfire2 and iterate thru the list once data is retrieved. Also note the change in attribute `templateUrl` to inline `template` below.
49+
Update `/src/app/app.component.ts` to import `AngularFireList` from `@angular/fire` and iterate thru the list once data is retrieved. Also note the change in attribute `templateUrl` to inline `template` below.
5050

5151
```ts
5252
import { Component } from '@angular/core';
53-
import { AngularFireDatabase } from 'angularfire2/database';
53+
import { AngularFireDatabase } from '@angular/fire/database';
5454
import { Observable } from 'rxjs';
5555

5656
@Component({
@@ -206,7 +206,7 @@ itemsRef.remove();
206206

207207
```ts
208208
import { Component } from '@angular/core';
209-
import { AngularFireDatabase, AngularFireList } from 'angularfire2/database';
209+
import { AngularFireDatabase, AngularFireList } from '@angular/fire/database';
210210
import { Observable } from 'rxjs';
211211
import { map } from 'rxjs/operators';
212212

β€Ždocs/rtdb/objects.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If you've followed the earlier step "Installation and Setup" your `/src/app/app
1616

1717
```ts
1818
import { Component } from '@angular/core';
19-
import { AngularFireDatabase } from 'angularfire2/database';
19+
import { AngularFireDatabase } from '@angular/fire/database';
2020
import { Observable } from 'rxjs';
2121

2222
@Component({
@@ -48,7 +48,7 @@ Then in your template, you can use the `async` pipe to unwrap the binding.
4848

4949
```ts
5050
import { Component } from '@angular/core';
51-
import { AngularFireDatabase } from 'angularfire2/database';
51+
import { AngularFireDatabase } from '@angular/fire/database';
5252
import { Observable } from 'rxjs';
5353

5454
@Component({
@@ -126,7 +126,7 @@ itemRef.remove();
126126

127127
```ts
128128
import { Component } from '@angular/core';
129-
import { AngularFireDatabase, AngularFireObject } from 'angularfire2/database';
129+
import { AngularFireDatabase, AngularFireObject } from '@angular/fire/database';
130130
import { Observable } from 'rxjs';
131131

132132
@Component({

β€Ždocs/rtdb/querying-lists.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ size$.next('small');
7979

8080
```ts
8181
import { Component } from '@angular/core';
82-
import { AngularFireDatabase, AngularFireAction } from 'angularfire2/database';
82+
import { AngularFireDatabase, AngularFireAction } from '@angular/fire/database';
8383
import { Observable, Subscription, BehaviorSubject } from 'rxjs';
8484
import { switchMap } 'rxjs/operators';
8585

0 commit comments

Comments
Β (0)