Skip to content

chore(): release @angular/fire 5.0 🎉🔥🕺 #1854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 6, 2018
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<a name="5.0.0"></a>
# [5.0.0](https://github.com/angular/angularfire2/compare/5.0.0-rc.12...5.0.0) (2018-09-04)


### Bug Fixes

* **firestore:** Better handle enablePersistence failures, esp. for Universal ([#1850](https://github.com/angular/angularfire2/issues/1850)) ([334ba7b](https://github.com/angular/angularfire2/commit/334ba7b))
* **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))


### Breaking changes

5.0 is now final and we're published under `@angular/fire`.

```bash
npm i --save firebase @angular/fire
```


<a name="5.0.0-rc.12"></a>
# [5.0.0-rc.12](https://github.com/angular/angularfire2/compare/5.0.0-rc.11...5.0.0-rc.12) (2018-08-24)

Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

[![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)

Status: Release candidate

## What is AngularFire?

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

```bash
npm install firebase angularfire2 --save
npm install firebase @angular/fire --save
```

## Example use:

```ts
import { Component } from '@angular/core';
import { AngularFirestore } from 'angularfire2/firestore';
import { AngularFirestore } from '@angular/fire/firestore';
import { Observable } from 'rxjs';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ the Firebase docs for more information on what methods are available.](https://f

```ts
import { Component } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireAuth } from '@angular/fire/auth';
import { auth } from 'firebase';

@Component({
Expand Down
12 changes: 6 additions & 6 deletions docs/firestore/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `AngularFirestoreCollection` service is a wrapper around the native Firestor

```ts
import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
import { Observable } from 'rxjs';

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

```ts
import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
import { Observable } from 'rxjs';

export interface Item { id: string; name: string; }
Expand Down Expand Up @@ -138,7 +138,7 @@ export class AppComponent {

```ts
import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

Expand Down Expand Up @@ -186,7 +186,7 @@ export class AppComponent {

```ts
import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

Expand Down Expand Up @@ -231,7 +231,7 @@ export class AppComponent {

```ts
import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

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

```ts
import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
import { Observable } from 'rxjs';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion docs/firestore/documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `AngularFirestoreDocument` service is a wrapper around the native Firestore

```ts
import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreDocument } from 'angularfire2/firestore';
import { AngularFirestore, AngularFirestoreDocument } from '@angular/fire/firestore';
import { Observable } from 'rxjs';

export interface Item { name: string; }
Expand Down
6 changes: 3 additions & 3 deletions docs/firestore/offline-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ To enable offline persistence in your AngularFire application, call `enablePersi
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AngularFireModule } from 'angularfire2';
import { AngularFirestoreModule } from 'angularfire2/firestore';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireModule } from '@angular/fire';
import { AngularFirestoreModule } from '@angular/fire/firestore';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { environment } from '../environments/environment';

@NgModule({
Expand Down
2 changes: 1 addition & 1 deletion docs/firestore/querying-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ size$.next('small');

```ts
import { Component } from '@angular/core';
import { AngularFirestore } from 'angularfire2/firestore';
import { AngularFirestore } from '@angular/fire/firestore';
import { Observable, BehaviorSubject, combineLatest } from 'rxjs';
import { switchMap } from 'rxjs/operators';

Expand Down
16 changes: 8 additions & 8 deletions docs/install-and-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You should see a message on the page that says *App works!*
### 3. Install AngularFire and Firebase

```bash
npm install angularfire2 firebase --save
npm install @angular/fire firebase --save
```

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

@NgModule({
Expand Down Expand Up @@ -110,10 +110,10 @@ For example if your application was using both Firebase authentication and the F
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AngularFireModule } from 'angularfire2';
import { AngularFirestoreModule } from 'angularfire2/firestore';
import { AngularFireStorageModule } from 'angularfire2/storage';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireModule } from '@angular/fire';
import { AngularFirestoreModule } from '@angular/fire/firestore';
import { AngularFireStorageModule } from '@angular/fire/storage';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { environment } from '../environments/environment';

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

```ts
import { Component } from '@angular/core';
import { AngularFirestore } from 'angularfire2/firestore';
import { AngularFirestore } from '@angular/fire/firestore';

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

```ts
import { Component } from '@angular/core';
import { AngularFirestore } from 'angularfire2/firestore';
import { AngularFirestore } from '@angular/fire/firestore';
import { Observable } from 'rxjs';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion docs/ionic/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Go to [Firebase console](https://console.firebase.google.com/) then click **Add
at `login.service.ts` add this function:
```ts

import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireAuth } from '@angular/fire/auth';
import firebase from 'firebase/app';
import AuthProvider = firebase.auth.AuthProvider;

Expand Down
14 changes: 7 additions & 7 deletions docs/ionic/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Your default browser should start up and display a working Ionic app.
### 3. Install AngularFire 2 and Firebase

```bash
npm install angularfire2 firebase --save
npm install @angular/fire firebase --save
```

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

import { AngularFireModule } from 'angularfire2';
import { AngularFireModule } from '@angular/fire';
import { firebaseConfig } from '../environment';

@NgModule({
Expand Down Expand Up @@ -122,10 +122,10 @@ import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';

import { AngularFireModule } from 'angularfire2';
import { AngularFireModule } from '@angular/fire';
import { firebaseConfig } from '../environment';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireDatabaseModule } from '@angular/fire/database';
import { AngularFireAuthModule } from '@angular/fire/auth';


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

@Component({
Expand All @@ -173,7 +173,7 @@ In `/src/pages/home/home.ts`:
```ts
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { AngularFireDatabase } from 'angularfire2/database';
import { AngularFireDatabase } from '@angular/fire/database';
import { Observable } from 'rxjs/Observable';

@Component({
Expand Down
22 changes: 11 additions & 11 deletions docs/ionic/v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ import { StatusBar } from '@ionic-native/status-bar';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';

import { AngularFireModule } from 'angularfire2';
import { AngularFireDatabaseModule, AngularFireDatabase } from 'angularfire2/database';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireModule } from '@angular/fire';
import { AngularFireDatabaseModule, AngularFireDatabase } from '@angular/fire/database';
import { AngularFireAuthModule } from '@angular/fire/auth';

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

import { AngularFireDatabase } from 'angularfire2/database';
import { AngularFireDatabase } from '@angular/fire/database';
import { Observable } from 'rxjs/Observable';

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

import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireAuth } from '@angular/fire/auth';
import firebase from 'firebase/app';

@Component({
Expand Down Expand Up @@ -398,7 +398,7 @@ export class HomePage {

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

`import { AngularFireAuthModule } from 'angularfire2/auth';`
`import { AngularFireAuthModule } from '@angular/fire/auth';`

and add it to the imports array.

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

import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireAuth } from '@angular/fire/auth';
import firebase from 'firebase/app';

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

import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireAuth } from '@angular/fire/auth';
import firebase from 'firebase/app';

import { Platform } from 'ionic-angular';
Expand Down Expand Up @@ -643,9 +643,9 @@ import { StatusBar } from '@ionic-native/status-bar';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';

import { AngularFireModule } from 'angularfire2';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireModule } from '@angular/fire';
import { AngularFireDatabaseModule } from '@angular/fire/database';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { Facebook } from '@ionic-native/facebook';

export const firebaseConfig = {
Expand Down
8 changes: 4 additions & 4 deletions docs/rtdb/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Replace your `/src/app/app.component.ts` from previous step to look like below.

```ts
import { Component } from '@angular/core';
import { AngularFireDatabase } from 'angularfire2/database';
import { AngularFireDatabase } from '@angular/fire/database';

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

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

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.
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.

```ts
import { Component } from '@angular/core';
import { AngularFireDatabase } from 'angularfire2/database';
import { AngularFireDatabase } from '@angular/fire/database';
import { Observable } from 'rxjs';

@Component({
Expand Down Expand Up @@ -206,7 +206,7 @@ itemsRef.remove();

```ts
import { Component } from '@angular/core';
import { AngularFireDatabase, AngularFireList } from 'angularfire2/database';
import { AngularFireDatabase, AngularFireList } from '@angular/fire/database';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

Expand Down
6 changes: 3 additions & 3 deletions docs/rtdb/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you've followed the earlier step "Installation and Setup" your `/src/app/app

```ts
import { Component } from '@angular/core';
import { AngularFireDatabase } from 'angularfire2/database';
import { AngularFireDatabase } from '@angular/fire/database';
import { Observable } from 'rxjs';

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

```ts
import { Component } from '@angular/core';
import { AngularFireDatabase } from 'angularfire2/database';
import { AngularFireDatabase } from '@angular/fire/database';
import { Observable } from 'rxjs';

@Component({
Expand Down Expand Up @@ -126,7 +126,7 @@ itemRef.remove();

```ts
import { Component } from '@angular/core';
import { AngularFireDatabase, AngularFireObject } from 'angularfire2/database';
import { AngularFireDatabase, AngularFireObject } from '@angular/fire/database';
import { Observable } from 'rxjs';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion docs/rtdb/querying-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ size$.next('small');

```ts
import { Component } from '@angular/core';
import { AngularFireDatabase, AngularFireAction } from 'angularfire2/database';
import { AngularFireDatabase, AngularFireAction } from '@angular/fire/database';
import { Observable, Subscription, BehaviorSubject } from 'rxjs';
import { switchMap } 'rxjs/operators';

Expand Down
Loading