This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { AngularFireAuth } from '@angular/fire/auth'; | |
| import { AngularFireDatabase } from '@angular/fire/database'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class UsuarioService { | |
| constructor(private afAuth: AngularFireAuth, private db: AngularFireDatabase) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ConfirmModalModule } from './shared/confirm-modal/confirm-modal/confirm-modal.module'; | |
| import { environment } from '../environments/environment'; | |
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
| import { NgModule } from '@angular/core'; | |
| import { FormsModule } from '@angular/forms' | |
| import { AppRoutingModule } from './app-routing.module'; | |
| import { AppComponent } from './app.component'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ion-header> | |
| <ion-toolbar color="primary"> | |
| <ion-buttons slot="start"> | |
| <ion-back-button></ion-back-button> | |
| </ion-buttons> | |
| <ion-title>Contato</ion-title> | |
| </ion-toolbar> | |
| </ion-header> | |
| <ion-content padding> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private getTotalRegistros() { | |
| return this.db.list("CONTATOS") | |
| .snapshotChanges().pipe( | |
| map(changes => { | |
| return changes.length; | |
| }) | |
| ) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AngularFireAuth } from 'angularfire2/auth'; | |
| import { AngularFireDatabase } from 'angularfire2/database'; | |
| import { Injectable } from '@angular/core'; | |
| @Injectable() | |
| export class ContatoProvider { | |
| private PATH = 'contatos/'; | |
| constructor(private db: AngularFireDatabase, public auth: AngularFireAuth) { | |
| this.PATH += this.auth.auth.currentUser.uid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { FirebaseApp } from 'angularfire2'; | |
| import { AngularFireDatabase } from 'angularfire2/database'; | |
| import * as firebase from 'firebase'; | |
| @Injectable() | |
| export class MeuService { | |
| PATH = 'produtos/'; | |
| PATH_IMG = 'img/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AngularFireDatabase } from 'angularfire2/database'; | |
| import { Injectable } from '@angular/core'; | |
| import { AngularFireAuth } from 'angularfire2/auth'; | |
| import * as firebase from 'firebase/app'; | |
| @Injectable() | |
| export class AccountProvider { | |
| private PATH = 'usuarios/'; | |
| constructor(public auth: AngularFireAuth, private db: AngularFireDatabase) { } |