How to display {{cats.length}} in app.component.html like it is in cats.component.html ?
adwulfran opened this issue · 2 comments
adwulfran commented
Hello,
In cats.component.html {{cats.length}} is displayed.
How can I display {{cats.length}} in app.component.html?
Note :
I could make it I imported cat-service and cat model in app.component.ts and add {{cats.length}} in app.component.html.
Problem: {{cats.length}} is well-displayed only when I refresh page. I want it instantly.
dougal83 commented
…
On Fri, Jun 15, 2018 at 11:29 AM adwulfran ***@***.***> wrote:
Hello,
In cats.component.html {{cats.length}} is displayed.
How can I display {{cats.length}} in app.component.html?
Note :
I could make it I imported cat-service and cat model in app.component.ts
and add {{cats.length}} in app.component.html.
Problem: count cats is working only when I refresh page. I want it
instantly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#187>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACm_Cb6xcvJd5jZjsUcZcugJZ3o0tXuoks5t84yIgaJpZM4UpWe7>
.
adwulfran commented
@dougal83 thanks for your answer. I could make it with https://angular.io/guide/component-interaction
via service