Having
export class AppComponent {
private getMyVar(n: number){
return Promise.resolve(n * n);
}
public async getVar(n: number): Promise<number> {
let result = await this.getMyVar(n);
return result;
}
}
how do you call the getVar from the HTML template?
I tried
<p>getVar = {{ this.getVar(9) | async }}</p>
but this does not seem to work. The CodePen here