Issue
I am new to angular and going through the tutorial on the official website. It makes extensive use of classes. Each Component is a class unlike React's functional components. Is there anything similar in Angular?
Solution
No to both questions.
Angular is a somewhat strict framework and you need to follow it's rules, the components are implemented with classes and that is that, there's not way around that.
The same applies for Typescript, angular replies heavily on that, in particular with the decorators, there is not way it could work with plain JS.
You are also using the wrong term here (at least from an Angular point of view) there is something called Functional Programming, in VERY simple terms, it basically means that you avoid imperative code such as for(let i=0; i< array.length; i++)
for a more functional approach such as array.forEach
.
If you are interested you can read more about functional programming in Angular in this medium post: Functional Programming in simple terms
Answered By - Dario Piotrowicz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.