Closed
Description
openedon Feb 25, 2021
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) -
@sentry/angular
Version:
6.2.0
Description
Hi,
I try to use the TraceDirectives in an Angular 9 project. (just a blank project created with angular-cli)
If I declare the TraceDirective like suggested in the manual:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {Router} from '@angular/router';
import * as Sentry from '@sentry/angular';
@NgModule({
declarations: [Sentry.TraceDirective],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [
{
provide: Sentry.TraceService,
deps: [Router],
},
],
bootstrap: [AppComponent]
})
export class AppModule { }
The Angular compiler complains:
Class TraceDirective is neither an Angular component nor directive nor pipe
That is something I would expect here because usually I would just import the module (exported @NgModule) instead of declaring a directive/component/pipe from a external module again in my own module.
Are Angular applications > 9 not supported by this module?
Thanks & best regards
Steffen
Activity