angular - 更改 Metronic Angular 以使用 Firebase
问题描述
我一直在使用Metronic的角度版本来制作角度管理员。安装后,我将连接放在enviroment.ts和enviroment.prod.ts上
npm install firebase @angular/fire --save
export const environment = {
production: true,
firebase: {
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
authDomain: "xxxxxxxxxxxxx.firebaseapp.com",
databaseURL: "https://xxxxxxxxxxx.firebaseio.com",
projectId: "xxxxxxxxxxx",
storageBucket: "xxxxxxxxxxx.appspot.com",
messagingSenderId: "xxxxxxxxxxx",
appId: "1:xxxxxxxxx:web:xxxxxxxxxxxxxxxxx",
measurementId: "xxxxxxxxxxxxx"
}
};
正如文档所说,我还更改了文件中的行:
src/app/modules/_services/auth-http/index.ts
从
export { AuthHTTPService } from './auth-fake-http.service'; // You have to comment this, when your real back-end is done
至
export { AuthHTTPService } from './auth-http.service'; // You have to uncomment this, when your real back-end is done
并评论 app.module.ts 上的行
environment.isMockEnabled
? HttpClientInMemoryWebApiModule.forRoot(FakeAPIService, {
passThruUnknownUrl: true,
dataEncapsulation: false,
})
: [],
aldo 在 app.module.ts 我导入库
import { AngularFireModule } from '@angular/fire';
在 ngModules 上我插入:
AngularFireModule.initializeApp(environment.firebase),
但它仍然没有登录工作
有人知道我还需要做什么才能让它在 Metronic 角度管理版本上工作
感谢您的帮助
解决方案
推荐阅读
- javascript - 如何使用 javascript 中的 Blob 下载可读格式的文本文件,无法以正确的格式导出
- jquery - 如何制作一个可以被cshtml中的另一个下拉列表过滤的下拉列表
- linux - 二进制部分注入
- oracle - Oracle 跟踪文件中的执行时间
- javascript - ReactJS:更改表单中的占位符颜色
- c# - 在 WEB API 中调用 SOAP API 导致同步问题
- webpack - 如何设置 useBuiltIns 选项
- scala - Scala:如何调用多态的泛型函数
- android - 恢复活动后添加到收藏标记不可见
- python - 如果行在日期范围之间,则设置列值