M
M
Morerion2016-11-02 10:33:06
Angular
Morerion, 2016-11-02 10:33:06

Why doesn't authorization work on AngularFire2 and Firebase?

Hello pros,
I'm trying to do a basic registration / login on AngularFire2, but for some reason there are problems,
Thanks in advance!
The code:

@Component({
  selector: 'app-root',
  template: `
  <input type="text" class="form-control" #emeil placeholder="Введите emeil" />
  <input type="text" class="form-control" #password placeholder="Введите пароль " />
  <button (click)="login(emeil.value,password.value)">Войти</button>
  `,
})

export class AppComponent {
  items: FirebaseListObservable<any>;
  constructor(public af: AngularFire) {
    this.items = af.database.list('/tasks');
    this.af.auth.subscribe(auth => console.log(auth));
  }
  login(emeil: string, password: string) {
    this.af.auth.login({
      email: emeil,
      password: password
    });
  }
}

Error:
a8681f09eed8434389767913360d691e.png
Firebase:
4d90ccfd4d5e418bb2acce1659b4a3e8.png70c48730608b4889862d75475f4026a8.png
Here is the link where I am learning:
https://github.com/angular/angularfire2/blob/maste...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question