docs(fcm): improve example

docs(fcm): improve example
This commit is contained in:
Daniel Sogl
2018-03-17 01:24:42 +01:00
committed by GitHub
+8 -8
View File
@@ -31,25 +31,25 @@ export interface NotificationData {
*
* ...
*
* fcm.subscribeToTopic('marketing');
* this.fcm.subscribeToTopic('marketing');
*
* fcm.getToken().then(token=>{
* this.fcm.getToken().then(token => {
* backend.registerToken(token);
* })
* });
*
* fcm.onNotification().subscribe(data=>{
* this.fcm.onNotification().subscribe(data => {
* if(data.wasTapped){
* console.log("Received in background");
* } else {
* console.log("Received in foreground");
* };
* })
* });
*
* fcm.onTokenRefresh().subscribe(token=>{
* this.fcm.onTokenRefresh().subscribe(token => {
* backend.registerToken(token);
* })
* });
*
* fcm.unsubscribeFromTopic('marketing');
* this.fcm.unsubscribeFromTopic('marketing');
*
* ```
* @interfaces