admin管理员组文章数量:1386226
I updated Angular from 18 to 19 with ng update @angular/core@19 @angular/cli@19
, and manually updated "@angular/core": "^18.0.5"
to "@angular/fire": "19.0.0"
.
@NgModule({
imports: [
...
AngularFireModule.initializeApp(firebaseConfig),
AngularFirestoreModule,
...
]
@Injectable({
providedIn: 'root',
})
export class RepositoryService {
constructor(private angularFirestore: AngularFirestore) { }
...
I expect to boot an app, but having this error
ERROR RuntimeError: NG0203: The `EnvironmentInjector` token injection failed. `inject()` function must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at /errors/NG0203
本文标签:
版权声明:本文标题:angularfire2 - RuntimeError: NG0203: The `EnvironmentInjector` token injection failed. Migrating Angular 18 -> 19 - Stack 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744472393a2607875.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论