I've tried to make a pretty basic class and for some reason I can't figure out why this variable "doesn't exist"
export class AppModule {
public static currentHost: string = 'http://localhost:8080/';
constructor() {
if (window.location.hostname == "localhost") {
this.currentHost = "http://" + window.location.hostname + "/";
}
}
}
ERROR in src/app/app.module.ts(62,12): error TS2339: Property 'currentHost' does not exist on type 'AppModule'.
Anyone see my error?