Having trouble with the rxjs subscribe method firing twice? Here's my code:
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
import { CadastrarUsuarioPage } from '../cadastrar-usuario/cadastrar-usuario';
import { FirebaseProvider} from '../../providers/firebase/firebase';
import { AngularFireOfflineDatabase, AfoListObservable, AfoObjectObservable } from 'angularfire2-offline/database';
import { HomePage } from '../home/home';
@Component({
selector: 'page-login',
templateUrl: 'login.html',
})
... (Code continues) ...
The issue is causing "false"/"true" and "done" to be printed twice each time it is called.
--UPDATE -- The entire code snippet is being executed inside a button click event.
-- UPDATE -- This code is part of a component being called from somewhere else in the application.
<ion-content padding class="content">
<ion-grid>
... (Component HTML markup continues) ...
</ion-content>