【问题标题】:Firebase Database (${JSCORE_VERSION}) INTERNAL ASSERT FAILED: Reference.ts has not been loaded. in angular 6 applicationFirebase 数据库 (${JSCORE_VERSION}) 内部断言失败:Reference.ts 尚未加载。在 Angular 6 应用程序中
【发布时间】:2018-10-01 09:03:30
【问题描述】:

我正在开发 Angular 6 最新版本。我为数据库安装了angularfire2。它工作正常。但是在 IE9 和 IE10 上显示错误。

Firebase Database (${JSCORE_VERSION}) INTERNAL ASSERT FAILED: Reference.ts has not been loaded

版本-

"@angular/fire": "^5.0.2"

"firebase": "^5.5.2",

请告诉我如何解决错误。

【问题讨论】:

    标签: firebase firebase-realtime-database angular6 angularfire2


    【解决方案1】:

    您需要发布您的代码,但显然无法加载文件 Reference.ts。

    默认情况下,AngularFire 使用 src/environment/environment.ts 作为 firebase 数据库信息

    export const environment = {
      production: false,
      firebase : {
        apiKey: "xxxx",
        authDomain: "xxx.firebaseapp.com",
        databaseURL: "https://xxx.firebaseio.com",
        projectId: "xxx",
        storageBucket: "xxx.appspot.com",
        messagingSenderId: "xxx"
     }
    
    
    };
    

    然后您将在 src/app/app.modules.ts 中引用它

      imports: [
        AngularFireModule.initializeApp(environment.firebase),
        AngularFirestoreModule,
        AngularFireDatabaseModule,
    

    【讨论】:

    • 你能把你所有的代码都贴在 .ts 组件上吗
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-25
    • 1970-01-01
    • 1970-01-01
    • 2017-08-21
    • 2016-01-16
    • 1970-01-01
    相关资源
    最近更新 更多