I've been working on a simple class and I'm stuck trying to figure out why the "currentHost" variable is showing as non-existent.
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'.
Any ideas where I might have gone wrong?