I'm having difficulty properly declaring a variable in my code.
Here is the code snippet I am working with:
ngOnInit(): void {
this.activatedRoute.fragment.subscribe(numberOfTab => {
if (numberOfTab) {
this.tabs[numberOfTab].active = true;
} else {...}
The issue is that I'm seeing an error message stating 'Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'landingPage: { id: 'landingPage', heading: 'shop.landingPage', active: false, loaded: true }'.
I am unsure why this error is happening and how I can resolve it.
If anyone can provide some insight, I would greatly appreciate it! Thank you.