What does the .subscribe() function do?

The .subscribe() function is similar to the Promise.then(), .catch() and .finally() methods in jQuery, but instead of dealing with promises it deals with Observables. That means it will subscribe itself to the observable of interest (which is getTasks() in your case) and wait until it is successful and then execute the first passed callback function … Read more

node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ‘;’ expected error after installation of Angular 6

This problem might arise due to version mismatch. To solve your problem you need to do following changes in your package.json file. Step 1 : Go to package.json and modify “rxjs”: “^6.0.0” to “rxjs”: “6.0.0” Step 2 Run npm install in your project. There is no need to change the typescript version. (Mine: “typescript”: “~2.7.2”) Edit: If you are using rxjs-compat then you also need to do following in order … Read more

What is the difference between Promises and Observables?

Promise A Promise handles a single event when an async operation completes or fails. Note: There are Promise libraries out there that support cancellation, but ES6 Promise doesn’t so far. Observable An Observable is like a Stream (in many languages) and allows to pass zero or more events where the callback is called for each event. Often Observable is preferred over Promise because it provides the features of Promise and more. With Observable it doesn’t … Read more

BehaviorSubject vs Observable?

BehaviorSubject is a type of subject, a subject is a special type of observable so you can subscribe to messages like any other observable. The unique features of BehaviorSubject are: It needs an initial value as it must always return a value on subscription even if it hasn’t received a next() Upon subscription, it returns the last … Read more

What is pipe for in RxJS?

The “pipeable” (former “lettable”) operators is the current and recommended way of using operators since RxJS 5.5. I strongly recommend you to read the official documentation on pipeable operators The main difference is that it’s easier to make custom operators and that it’s better treeshakable while not altering some global Observable object that could possible make collisions if two different … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)