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