ActivatedRoute can't retrieve data Angular 16

111 views Asked by At

When I call ActivatedRoute, I receive nothing in the objects

I try to get snapshot data form ActivatedRoute like this :

Code in OutilsComponent :

constructor(private _activatedRoute: ActivatedRoute,){}

ngOnInit(){
    console.log(this._activatedRoute.snapshot);
}

Code in app-routing.module.ts :

{
    path: 'outils',
    component: OutilsComponent,
    data: {
      filDArianne: [{ url: 'outils', label: 'Outils', guarded: true }]
    }
},

What console.log return :

This is when im on 'Outils' page

image of console.log

Why I have nothing in any ActivatedRoute item ?

0

There are 0 answers