We are creating an angular elements to be embedded in an other web site.
The angular-elements need to read the queryParams to get specific details and need to react when the queryParams change.
So with an Angular App its fairly easy! The code below work inside an Angular App.
constructor(private route: ActivatedRoute) { }
ngOnInit(): void {
this.route.queryParams.subscribe(params => {
console.log(params);
})
}
Test with: ?id=123
params: {
id: 123
}
When i use the same code in my Angular Elements the params are empty!
What am i missing ?
Is there a way to get this inside an Angular Elements ?