异步有什么用?

What's the async for?

我们经常在 attribute/directive 的值中看到管道 |async。例如

<ngx-datatable [rows]="rows | async"

请问它们是做什么用的?

Angular docs says:

Unwraps a value from an asynchronous primitive.

async 管道允许避免在 TypeScipt 中创建变量或属性。所以我们可以在模板中使用 promises 和 observables。