RE: How to use observables in an Ionic framework?

How to use observables in an Ionic framework?

ankit Senior Developer Asked on February 28, 2019 in IONIC.
Add Comment
1 Answers

You can subscribe to an observable to do things with the data that it emits and observable won’t be executed until they are subscribed.

Observable sample  format:

 

let myObservable = Observable.create(observer => {

observer.next("hello");

});
myObservable.subscribe((data) => {

console.log(data);

});

 

Team Leader Answered on March 22, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.