I'm having trouble declaring a variable correctly.
I am using the code here:
ngOnInit(): void {
this.activatedRoute.fragment.subscribe(numberOfTab => {
if (numberOfTab) {
this.tabs[numberOfTab].active = true;
} else {...}
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 }'.
No index signature with a parameter of type 'string' was found on type.
I don't quite understand why and how to fix it.
Thanks in advance for clarification!