English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
AngularJS is an open-source web application framework. It was originally developed by Misko Hevery and Adam Abrons in2009Year developed. It is now maintained by Google. Its latest version is1221
The official documentation defines AngularJS as follows-
AngularJS is a structural framework for dynamic web applications. It allows you to use HTML as a template language and can extend the syntax of HTML to clearly and concisely express application components. Its data binding and dependency injection eliminate much of the code you currently have to write. All of this happens within the browser, making it an ideal partner for any server technology.
The general functions of AngularJS are as follows-
AngularJS is an efficient framework for creating rich Internet applications (RIA).
AngularJS provides developers with the option to write client applications in a clean Model View Controller (MVC) style using JavaScript.
Applications written with AngularJS are compatible across browsers. AngularJS automatically handles JavaScript code suitable for each browser.
AngularJS is open source, completely free, and used by thousands of developers worldwide. It is licensed under the Apache License version2
In general, AngularJS is a framework used to build large-scale, high-performance, and easy-to-maintain web applications.
The core features of AngularJS are as follows-
Data-binding
− This is the automatic synchronization of data between model and view components.
Scope
− These are objects that reference the model. They act as a glue between the controller and the view.
Controller
− These are JavaScript functions bound to a specific scope.
Services
− AngularJS comes with some built-in services such as $http to generate XMLHttpRequests. These are singleton objects, instantiated only once in the application.
Filters
− These select a subset of items from an array and return a new array.
Directives
− Pseudo-commands are tags on DOM elements (such as elements, attributes, css, etc.). These can be used to create custom HTML tags that act as new custom widgets. AngularJS has built-in directives such as ngBind, ngModel, etc.
Templates
− These are rendered views with information from controllers and models. These can be a single file (e.g., index.html) or usingpartialsMultiple views within a single page.
Routing
− It is the concept of switching views.
Model View Whatever
−
MVW is a design pattern used to divide an application into different parts, called model, view, and controller, each with different responsibilities. AngularJS does not implement the traditional MVC, but is closer to MVVM (Model-View-ViewModel).-View-ViewModel). Angular
The JS team humorously calls it 'Model View'.
Deep Linking
− Deep linking allows the state of the application to be encoded in the URL, so it can be added as a bookmark. Then the application can be restored to the same state from the URL.
Dependency Injection
− AngularJS has a built-in dependency injection subsystem that helps developers easily create, understand, and test applications.
The following figure describes some important parts of AngularJS, which will be discussed in detail in the following chapters.
The advantages of AngularJS are-
It provides the ability to create single-page applications in a very clean and maintainable way.
It provides data binding functionality to HTML, thus offering users a rich and responsive experience.
AngularJS code is testable in unit.
AngularJS uses dependency injection and leverages separation of concerns.
AngularJS provides reusable components.
With AngularJS, developers can implement more features with less code.
In AngularJS, views are pure HTML pages, with controllers written in JavaScript handling business logic.
Most importantly, AngularJS applications can run on all major browsers and smartphones, including mobile phones based on Android and iOS/Tablet.
Although AngularJS has many advantages, there are some points to note here-
Security − As a pure JavaScript framework, applications written with AngularJS are not secure. Server-side authentication and authorization are necessary conditions to ensure application security.
Invalid
− If the JavaScript used by the application user is disabled, any content other than the basic page is not visible.
The AngularJS framework can be divided into three main parts-
ng-app
− This directive defines an AngularJS application and links it to HTML.
ng-model
− This pseudo-directive binds the value of AngularJS application data to HTML input controls.
ng-bind
− This directive binds AngularJS application data to HTML tags.