Skip to content

AngularfirePerformance in main.ts #3420

@sanderschnydrig

Description

@sanderschnydrig

I tried to find information about this but couldn't find anything. Is it possible to use AngularfirePerformance to monitor the Angular bootstrapping in main.ts?

Using this code and @angular/fire at version ^7.6.1:

import { AngularFirePerformance } from '@angular/fire/compat/performance';
const performance = inject(AngularFirePerformance)

I'm getting this error:

core.mjs:4768 Uncaught Error: NG0203: inject() must be called from an injection context
    at injectInjectorOnly (core.mjs:4768:1)
    at ɵɵinject (core.mjs:4778:1)
    at 14431 (main.ts:25:27)
    at __webpack_require__ (bootstrap:19:1)
    at __webpack_exec__ (|groupOptions: {}|namespace object:239:1)
    at |groupOptions: {}|namespace object:239:1
    at __webpack_require__.O (chunk loaded:23:1)
    at |groupOptions: {}|namespace object:239:1
    at webpackJsonpCallback (jsonp chunk loading:71:1)
    at main.js:1:59

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions