2017-12-29 18 views
1

저는 파이어베이스 데이터베이스에 연결된 각도 앱을 가지고 있습니다. 데이터베이스에서 데이터를 읽을 수 있습니다. 그러나 로그인을 사용 설정하고 앱에 기능을 등록하려고합니다.하지만 시도 할 때말하기 오류 : [ts] 'firebase'라는 이름을 찾을 수 없습니다.

firebase.auth();

나는 [TS]를

은 내가 상단에 약간의 수입 실종이 video

을 따르도록 노력하고 있어요 '중포 기지를'이름을 찾을 수 없다는 오류가? 현재 난 그냥이 ...

import { Component } from '@angular/core'; 
import {AngularFireDatabase} from 'angularfire2/database' 

내 코드는 내부 app.component.ts 파일이 :

import { Component } from '@angular/core'; 
import {AngularFireDatabase} from 'angularfire2/database' 

@Component({ 
    selector: 'app-root', 
    templateUrl: './app.component.html', 
    styleUrls: ['./app.component.css'] 
}) 
export class AppComponent { 
    title = 'app'; 
    courses:any[]; 


    constructor(db:AngularFireDatabase) 
    { 
    db.list('/courses').valueChanges().subscribe(courses=>{ 
     this.courses = courses; 
     console.log(this.courses); 
    }) 


    const auth = firebase.auth(); // -->> ERROR 

    } 
} 

답변

1

비디오 그래서 약간의 변화가 있었다 꽤 오래있다. 동영상이 출시 된 시점에서 버전으로 다운 그레이드 할 수 있습니다. 아니면 "새로운"방법을 사용할 수도 있습니다. Here은 인증의 한 예입니다. 또한 here은 전체 changelog입니다.

+0

감사합니다. 나는 "새로운"길을 따라 갔고 그것이 나를 위해 일한다. :) – psj01