Search This Blog

Friday, December 8, 2017

Angular JS ,2.0,4.0 Journey:



Angular JS PROS and CONS:
Angular JS Features List
1.       Introduction
Angular JS 1.X is the most popular JavaScript framework to build web applications. It was released by Google on October 20, 2010. Angular 1 is developed using TypeScript and JavaScript and uses traditional HTML. Angular 1 uses Controllers and Scope object.
2.       Prerequisites - to learn Angular 1 – JavaScript, HTML only
3.       Binding
4.       One-Way binding – you are required to use ng-bind for one way data binding in Angular 1
For Ex. <div ng-bind=”message”></div>
5.       Two-Way Binding – you are required to use {{ message }} for two way data binding in Angular 1
For Ex. <div ng-model=”message”> </div>
6.       Bootstrapping
There are two ways to bootstrap Angular app in Angular 1.

Via ng-app
For Ex. <html ng-app=”myAngularApp”></html>

Via code
For Ex. 
7.        <script>  
8.        angular.element(document).ready(function() {  
9.        angular.bootstrap(document, ['smyAngularApp']);  
10.     });  
11.     </script>  
12.   Performance
Angular 1 is slow if you have used too many watchers in your angular 1 app. You need to reduce watchers to make it faster.
13.   For more information about Watchers & Digest Cycle in AngularJS, Read the below article -       

15.   Mobile Support
Angular1 is responsive but, does not have mobile support. It was not built for mobile devices. It is possible to run Angular 1 on mobile, but using 3rd party frameworks.
16.   Services
There are various ways to create services in Angular 1 like Service, Factory, Provider etc.
17.   Filters 
Filters are used to filter a result set in Angular 1.

Angular 2 Features List
  1. Angular 2 is five times faster than Angular 1
  2. By default, it support for one-way data binding.
  3. In optional, it support for two-way data binding.
  4. It widely support for Typescript and ES6.
  5. It contains component-based architecture.
  6. Less coding requires that is more application focus.
  7. Angular 2 is based on Mobile First approach.
  8. It is oriented on the apps with a big amount of interactive client side code.
  9. Best for dynamic apps with a single page.
  10. It offers fast development process.
  11. Offers advanced testing features.
  12. In most of the cases, demands less coding.
  13. Perfect for server side rendering.
  14. The framework approach that offers everything a developer needs to build apps.
  15. Being ES2015, it already takes advantage of many latest language features.
  16. Easy to test.
  17. Improved data binding.
  18. Components based.
Angular 4 Features List
  1. Angular 4 are five times faster and smaller as compared to Angular 2..
  2. It is possible to view engine and how AOT generated code looks like.
  3. Improved nglf and ngFor.
  4. Running Angular on a server.
  5. Source maps for templates.
  6. Typescript 2.1 and 2.2 compatibility.
  7. Flat ESM/FESM modules for tree shaking and reducing size of generated bundles.
  8. Experimental Closure compatibility to take advantage of advanced Closure optimizations, getting smaller bundle sizes and better tree shaking.
  9. Backward compatible as PATCH increased when some troubleshooting is done even without changing the API.
  10. It is possible to request for the route and query parameter assigned to a route because of Router PARAM Map.
  11. Dynamic components with NgComponentOutlet to build dynamic components in a declarative way.
  12. Forms get assigned “no validate” automatically.
  13. Availability of source maps for templates.