Ninja Space Content Tech Blog

Week Nine of Learning Angular

Posted by Ninja Space Content on Wednesday, August 4, 2021 Under: angular
Oh my goodness, I am so tired this morning. I only had 2 hours of sleep!

My contracting work is slow this week so I am getting back to Learning Angular with Mosh (self-paced tutorial) again. I am 34% of the way. I know you're probably wondering why it is taking me so long to finish! As mentioned in my other weekly blog recaps with learning notes for Angular, it's because it takes me a long time to debug version differences as I am running a new version of Angular, whereas Mosh's tutorial is teaching with a much older version. I'm coding along while I'm listening to his videos.

Optimistic vs Pessimistic Updates
Modern updates utilizes Optimistic Updates as it'll render changes faster, which is where you make the changes like using a splice method before you make a call to an API server.

Observables vs Promises
For Angular, you use can Observables async operations. The async calls will only happen when you call subscribe with an observable. Observable are lazy and promises are eager and nothing happens until you subscribe with observable. You can always change observable into a promise but Mosh doesn't recommend it. You also need .then for observables whereas, you don't need a .then with promises.

The cool thing about observables is you can use something like the .retry(3) operator. You mainly use .map and .catch for observables. You can also chain events before subscribing when using observables.

In : angular 


Tags: learning angular  beginning angular  programming with mosh review 

About Ninja Space Content


Ninja Space Content I have been building simple websites on my own since 2008 and currently run several websites at the moment, including this one. I used to be an account manager for an affiliate/e-commerce company, helping affiliates grow their sales so I have some knowledge on the business side and client side of affiliate marketing. During the Covid-19 pandemic, I completed a JavaScript coding bootcamp and graduated in Dec 2020. I've been working as a contractor for a few software companies ever since.
Note: links to resources and promoting special deals may allow me to earn a small commission from each sale.