Suppose I'm used to coding on the server side (with server-side languages), and now I'm learning AngularJS. That means I first need a good understanding of JavaScript.
If I don't have to time to fully learn JavaScript right now, what five JavaScript concepts would you recommend I learn first/well in order to be an effective AngularJS developer?
Using Angular effectively requires that you understand the fundamentals of JavaScript. What's more, the value you derive from Angular will be proportional to how adept you are at JavaScript. I don't recommend learning Angular without at least a basic understanding of JavaScript.
null
, undefined
are all primitives. [1,2,3]
), object ( { prop1: value1, prop2: value2 }
), and function are all objects.this
(example)Also note that JavaScript is single-threaded!
In my view you should get clarity on the following topics
1) call by value vs call by reference in javascript
Reason: because in angularJS we deal with a lot of objects. You will be clear about their behaviour once you understand this
2) Scope chain and IIFE(Immediately invocable function expression)
Reason: When you work on an application using angularJS IIFEs play a major role in manipulating your scope.
3) Closures
Reason: One of the most important javascript concept. If you see source code of a lot of famous libraries and frameworks built on javascript, they have used closures a lot. Closures will also help you understand how factories work in depth.
4) Dependency Injection
Reason: A javascript concept on which Angular JS is based
5) You can also go through some good style guides for AngularJS. For instance you can refer to this one: https://github.com/johnpapa/angular-styleguide
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With