Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

550
Visualizações
How to select json value as Rxjs Observable?

I have tried to read the json value through Rxjs observable and Bind in the view as follows and not able to get the value and instead it shows the anonymous object.

app.component.html

Count: {{ count$| async }} 

app.component.ts

@select() readonly count$: Observable<number>; 

ReduxState Object

{
  count: {
    counter: 10
  }
}
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You should know that you selected anonymous object because it didn't match the name of the property.

The select decorator uses a parameter to get the value of property, but

If nothing is passed then the @select decorator will attempt to use the name of the class property to find a matching value in the Redux store. Note that a utility is in place here where any $ characters will be ignored from the class property's name.

You can use state of the store

@select(state => state.count.counter) readonly count$: Observable<number>; 
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda