I am trying to access my property defined in a class constructor, from a method but it comes as undefined. Following is my code.
export class App {
uri:string
constructor() {
this.uri = "bbc"
}
public address(){
$( "#post" ).fadeOut( "slow", function() {
window.location.href = window.location.protocol + "//" + window.location.host + this.uri +".com";
});
}
}
and here is plunker example. The question was marked as duplicate but it is not, as I am inside class and I cannot use arrow function, as far as I am aware