Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<a name="5.0.2"></a>
## [5.0.2](https://github.com/angular/angularfire2/compare/5.0.1...5.0.2) (2018-09-21)

### Bug Fixes

* **messaging:** Fix for the binding issue and onTokenRefresh for Messaging ([e170da1](https://github.com/angular/angularfire2/commit/e170da1))


<a name="5.0.1"></a>
# [5.0.1](https://github.com/angular/angularfire2/compare/5.0.0...5.0.1) (2018-09-07)

Version 5.0.1 has been released for the deprecated `angularfire2` NPM library; this simply re-exports everything from `@angular/fire`; allowing you to use either `angularfire2` or `@angular/fire` in your imports and `package.json`.

It will have it's dependency pinned to the corresponding minor and will be released alongside future `@angular/fire` releases for the rest of the 5.x series.


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

Expand Down
2 changes: 1 addition & 1 deletion docs/messaging/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AngularFireModule } from '@angular/fire';
import { AngularFireStorageModule } from '@angular/fire/messaging';
import { AngularFireMessagingModule } from '@angular/fire/messaging';
import { environment } from '../environments/environment';

@NgModule({
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angularfire2",
"version": "5.0.0",
"version": "5.0.2",
"description": "The official library of Firebase and Angular.",
"private": true,
"scripts": {
Expand All @@ -12,7 +12,7 @@
"delayed_karma": "sleep 10 && karma start",
"build": "rm -rf dist && node tools/build.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"build:wrapper": "npm i --prefix wrapper && VERSION=5.0.0 npm run --prefix wrapper build"
"build:wrapper": "npm i --prefix wrapper && VERSION=5.0.2 npm run --prefix wrapper build"
},
"keywords": [
"angular",
Expand Down
2 changes: 1 addition & 1 deletion src/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@angular/fire",
"version": "ANGULARFIRE2_VERSION",
"description": "The core module",
"description": "The official library for Firebase and Angular",
"main": "./bundles/core.umd.js",
"module": "index.js",
"es2015": "es2015/index.js",
Expand Down
6 changes: 4 additions & 2 deletions src/messaging/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export class AngularFireMessaging {
);

const tokenChanges = this.messaging.pipe(
switchMap(messaging => new Observable(messaging.onTokenRefresh)),
switchMap(messaging => new Observable(messaging.onTokenRefresh.bind(messaging)).pipe(
switchMap(() => messaging.getToken())
)),
runOutsideAngular(zone)
);

Expand All @@ -62,7 +64,7 @@ export class AngularFireMessaging {
);

this.messages = this.messaging.pipe(
switchMap(messaging => new Observable(messaging.onMessage)),
switchMap(messaging => new Observable(messaging.onMessage.bind(messaging))),
runOutsideAngular(zone)
);

Expand Down