0

We have an application which was developed using AngularJs and then we start migrating to Angular 16. Most of the things working as expected. Now I wanted to use a new angular component within old Angular component. This new component need to subscribe to ActivatedRoute. When it subscribes

export class TagsComponent implements OnInit {

  constructor(
    private route: ActivatedRoute
  ) {}
  
  ngOnInit(): void {
     this.route.params.subscribe((params) => {
        console.log(params);  // this gives me empty object when url is like -> /lorum/:id1/:id2/ipsum
        // it should give {id1: 12313, id2: 345346} something like this
     })
  }
}

should be something like this.

But it is give an empty object.

0 Answers0