I am currently working on an Angular project that focuses on geographic system data.
The concept is as follows:
- I have a component with the route:
{path: 'home'}
. - I aim to pass a geojson URL along with this route, making it look like this:
{path: 'home/:url'}
- Within the component's OnInit function, I retrieve the URL and utilize it in a specific function.
- However, I am facing an issue where entering a long URL redirects me to the login page instead of functioning properly.
My code snippet is as below:
ngOnInit() {
this.subscription = this.route.params.subscribe(params => {
this.load(params['url']);
});
}
load (url) {
// function code goes here
}
Appreciate your assistance.