Why AngularJS?17 Apr 2016
I wanted to share a few thoughts about AngularJS
How I got into AngularJS
Angular has lots of great features from testability and two-way binding, to more vague concepts. For me the best thing about Angular is that it has a flat learning curve So you can get the most of it. All being said here are the some of my favorite features and benefits of Angular:
- Code Reduction: Angular reduces the amount of code that developers write.
- Two Way Binding
- Beautiful syntax and higher level APIs
Whereas with Angular you can simple achieve same goal this way:
As you can see the Angular code is less complex.
Angular was designed with testing in mind. So you can test any components of your application easily through both unit testing and end to end testing. For unit testing you can use a component called ngMock and for e2e testing you can use Protractor. It is worthwhile to mention that for both cases you can run your tests using a tool called Karma.
Although Angular is a great framework but it has some problems that you can run into trouble with it. Here are some of them:
For dealing with this issue we can use server side rendering or use a prerenderer,
One thing that causes performance problem in Angular is having too many bindings. If performance is important you can consider using a different rendering engine.
- External Events and Digest Cycle
Even though Angular 2 is coming, But Angular 1 is still a thing and I think Angular 1 will be supported for a long time to come.