【发布时间】:2020-08-29 19:19:15
【问题描述】:
我正在尝试将变量传递给与异步管道一致的子组件。我可以用管道显示该数据,它工作正常。但是,当我尝试传递数据时,出现了错误。
ERROR Error: Uncaught (in promise): Error: The pipe 'async' could not be found!
错误:找不到管道“异步”!
组件视图
<!-- CONTENT -->
<div class="content">
{{(userInfo | async)?.data()}} // This works fine if the below is not included
<mat-tab-group dynamicHeight="true"
style="width:60%; margin:0px 20%;">
// This produces an error
<mat-tab label="Bio">
<profile-about [userData]='userData' [userInfo]='userInfo | async'></profile-about>
</mat-tab>
<mat-tab label="Companies">
<profile-companies [userData]='userData' [userInfo]='userInfo | async'></profile-companies>
</mat-tab>
</mat-tab-group>
</div>
<!-- / CONTENT -->
我在articles 中看到了这个,看起来很简单。有人讨论需要包含另一个模块 - commonModule,但这对我来说意义不大。
【问题讨论】:
标签: angular rxjs angular-pipe