@
@
@atmk2018-08-28 11:13:27
Angular
@atmk, 2018-08-28 11:13:27

How to subscribe to RxJS variable in Angular?

Variable in Service:
export class MyService {
myVar: Observable
constructor() { }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Eremin, 2018-08-28
@EreminD

myVar.subscribe(data => console.log(data))
https://angular.io/guide/observables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question