我正在尝试使用Firebase Remote Config
。他们提供的其他服务有一个包装器:
但是我似乎可以看到支持Remote config
吗?
因此,在documentation之后,我做了以下service
:
import {Injectable} from '@angular/core';
import {FirebaseConfig} from '@ionic-native/firebase-config/ngx';
@Injectable({
providedIn: 'root'
})
export class TextService {
constructor(private firebaseConfig: FirebaseConfig) {
this.firebaseConfig.getString('language_da').then((result) => {
console.log(result);
}).catch((error) => {
console.log(error);
});
}
}
但是这给我一个inject
错误:
core.js:9110 ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[FirebaseConfig]:
StaticInjectorError(Platform: core)[FirebaseConfig]:
NullInjectorError: No provider for FirebaseConfig!
有人可以告诉我使用Remote config
的正确方法吗?