Angular 角度异步可观察如何显示字段?

Angular 角度异步可观察如何显示字段?,angular,Angular,$app是可观察的 当我使用: email::::: {{ app$ | async }} 我在屏幕上看到: email::::: [object Object] email::::: 但如果我使用: email::::: {{ app$.email | async }} 我在屏幕上看到: email::::: [object Object] email::::: 连同控制台上的错误: MyComponent.html:3 ERROR Error: InvalidPipeArgume

$app是可观察的

当我使用:

email::::: {{ app$ | async }}
我在屏幕上看到:

email::::: [object Object]
email:::::
但如果我使用:

email::::: {{ app$.email | async }}
我在屏幕上看到:

email::::: [object Object]
email:::::
连同控制台上的错误:

MyComponent.html:3 ERROR Error: InvalidPipeArgument: 'true' for pipe 'AsyncPipe'
    at invalidPipeArgumentError (common.js:4232)
    at AsyncPipe.push../node_modules/@angular/common/fesm5/common.js.AsyncPipe._selectStrategy (common.js:4839)
    at AsyncPipe.push../node_modules/@angular/common/fesm5/common.js.AsyncPipe._subscribe (common.js:4829)
    at AsyncPipe.push../node_modules/@angular/common/fesm5/common.js.AsyncPipe.transform (common.js:4811)
    at Object.eval [as updateDirectives] (SocialLoginComponent.html:3)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:11914)
    at checkAndUpdateView (core.js:11307)
    at callViewAction (core.js:11548)
    at execComponentViewsAction (core.js:11490)
    at checkAndUpdateView (core.js:11313)

如何使用async修饰符打印
app$.email

您需要等待使用async管道发出可观察到的信息。一旦它发出,您就可以访问带有email属性的对象。通过将订阅包装在括号中,您可以访问电子邮件属性,如下所示:

{(app$| async.email}

您需要使用异步管道等待可观察到的发射。一旦它发出,您就可以访问带有email属性的对象。通过将订阅包装在括号中,您可以访问电子邮件属性,如下所示:

{(app$| async.email}

您是否在代码中订阅了应用程序$?您可以显示可观察的代码吗?共享我的组件.ts更新问题您是否在代码中订阅了
app$
?你能显示可观察的代码吗?共享我的组件.ts更新问题