Top 5 Tips to Learn Angular - Advices You Need to Know
This are 5 important things to learn in Angular if you want to use it on a good level
Typescript
The most important thing to learn about Angular is Typescript. As Angular is being build with Typescript it makes a lot of sense to learn it deeply. Also Typescript is extremely popular nowadays to be used instead of plain javascript so even if you jump later away from Angular you can still use it.
The problem here is that it is possible to use Angular without deep Typescript knowledge. Most people start with Angular only with Javascript knowledge, at a maximum they use several interfaces or write any at some places that doesn't work and they can't understand why.
Don't do that. The goal of Typescript is to help you. If you have Typescript errors you must fix them correctly without any. I highly recommend you to improve your Typescript knowledge because it will help you to build scalable, robust applications and avoid runtime errors.
RxJS
The next important thing to master is RxJS. It's a library which implements streams in Javascript and Angular is build around it. The problem is here that in other frameworks or in plain Javascript people are not using it. This is why they start to write code like they did in other frameworks with promises or with plain data and it is the way to fight with framework not to use it.
The solution here is to try and use RxJS in Angular as much as possible. Mostly without subscribe but just with async pipes and observables. You need to learn how to map and filter data, combine streams, store data in subjects and much more.
Dependency injection
Dependency injection is the code feature of Angular which allows us to isolate our modules and define what from them can be used outside. In other frameworks we normally don't have modules and dependency injections so it may be a new concept for you. It's extremely important to understand how dependency injection is working, how to share and reuse components by injecting other modules, how to create injection tokens and much more.
NgRx
What we miss in Angular is a state manager. Sure we have services were we can share any data across the application but it's not a high level architecture with strict rules which is scalable for big applications. The most popular solution for this is an additional library which is called NgRx. It's a Redux implementation for Angular which leverages Typescript and Rxjs so you continue to write everything in Angular way. Lots of big companies use NgRx so it's important knowledge if you want to build medium and big applications with Angular.
Here you need to learn how to create reducers, register them in models, create and dispatch actions, handle async operations with effects.
Angular forms
Angular forms and especially Reactive forms is one more important knowledge to learn in Angular. It allows you to spend as little time as possible on creating forms because you can define you form object and bind your inputs to it in a matter of minutes. You also get things like form validation, dirty, pristine state and much more. Reactive forms are especially interesting because they are build on the top of Rxjs. Which means you can combine your streams from the forms with any other streams from your application.
I highly recommend you to invest your time and learn Angular forms as most often on client side you create forms.
Change detection
And here is 1 more bonus point to learn that is extremely important for performance of Angular applications. It's change detection. There are different change detection strategies in Angular and the default behaviour is not the best for performance because components are being rerendered too often. If you want your Angular application to be fast you need to deeply understand how change detection is working in Angular, how you can disable it for certain components and manually trigger it when you need to deliver updates.
So this were my 5 recommendations what you need to be a good Angular developer.
Want to conquer your next JavaScript interview? Download my FREE PDF - Pass Your JS Interview with Confidence and start preparing for success today!