I'm currently working on implementing a language change feature on my webpage, but I've encountered the following error:
Error: Property 'translate' does not exist on type 'LogComponent'
export class LogComponent {
langs: any;
constructor( translate: TranslateService ){
this.langs = translate.getLangs();
}
langSelect(lang: string): void {
this.translate.use(lang);
}
}
Additionally, here is the relevant HTML code snippet:
<select #langSelected (change)="langSelect(langSelected)">
<option *ngFor="let l of langs" [value]="l">{{ l }}</option>
</select>
However, despite these efforts, the functionality seems to be malfunctioning. Can you spot what I might have overlooked?