Angular
What is Angular
Angular is a platform and framework for building single-page client applications using HTML and TypeScript.Angular is written in TypeScript.As a set of TypeScript libraries that you import into your applications, it implements core and optional features.An Angular application’s architecture is based on a few basic principles.The Angular framework’s fundamental building blocks are Angular elements, which are grouped into NgModules.NgModules are functional collections of related code; an Angular app is represented by a collection of NgModules.An app must have at least one root module to allow bootstrapping, and many more feature modules are popular.Angular initially released 4 years ago on September 14,2016.Angular helps build interactive and dynamic single page applications (SPAs) with its compelling features including templating, two-way binding, modularization, RESTful API handling, dependency injection, and AJAX handling.
Angular includes:
- A component-based framework for building scalable web applications
- A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication
- A suite of developer tools to help you develop, build, test, and update your code
Differences between AngularJS and Angular.
Angular:
- Angular uses components and directives. Here component is directive with a template.
- Angular code is written in typescript.
- Angular develped applications are mobile browser friendly.
- () and [] attributes are used to bind data between view and model.
- Hiearchical DI system is used in Angular.
- Angular code is better structured, is easy to create and manage bigger applications.
AngularJS:
- AngularJS works on MVC, Model View Controller Design. Here View shows the information present in the model and controller processes the information.
- AngularJS code is written in javascript.
- AngularJS code is not mobile friendly.
- {{}} are used to bind data between view and model. Special methods, ng-bind can also be used to do the same.
- DI is not used.
- AngularJS project is difficult to manage with increasing size of the source code.
Advantages of Angular
- Maintained by google
- Large community and ecosystem
- Two-way data binding
- Use of TypeScript
- Dependency injection
- Powerful router
- Availability of packages
Disadvantages of Angular
- Steeper learning curve
- Limited SEO Capabilities
- Too many versions
- Decline in popularity
Angular architecture
The architecture diagram identifies the eight main building blocks of an Angular application:
- Modules
- Components
- Templates
- Metadata
- Data binding
- Directives
- Services
- Dependency injection
You write Angular applications by composing HTML templates with Angularized markup, writing component classes to manage those templates, adding application logic in services, and boxing components and services in modules.
Then you launch the app by bootstrapping the root module. Angular takes over, presenting your application content in a browser and responding to user interactions according to the instructions you’ve provided.
Thank you !