@mburger81 wrote:
Hi to every one, we never used await/async, so the question could be also a stupid one but what do we wrong?
This is our code:
constructor() { let text = this.textAsync(); console.log('text: ', text); } async textAsync() { let val = await this._text(); return val; } _text(): Promise<any> { return new Promise((resolve, reject) => { resolve('TEEEEXXTTTTT'); }) }The log is never
text: TEEEEXXTTTTTbut something like thattext: ZoneAwarePromise {__zone_symbol__state: null, __zone_symbol__value: Array[0]}I'm sure there is a simple solution
thx
Posts: 1
Participants: 1
