ANGULAR-JS
The AngularJS framework worked by first reading the HyperText Markup Language (HTML) page, which had additional custom HTML attributes embedded into it. Angular interpreted those attributes as directives to bind input or output parts of the page to a model that is represented by standard JavaScript variables. The values of those JavaScript variables could be manually set within the code or retrieved from static or dynamic JSON resources.
AngularJS was built on the belief that declarative programming should be used to create user interfaces and connect software components, while imperative programming was better suited to defining an application's business logic.[7] The framework adapted and extended traditional HTML to present dynamic content through two-way data-binding that allowed for the automatic synchronization of models and views. As a result, AngularJS de-emphasized explicit Document Object Model (DOM) manipulation with the goal of improving testability and performance.
AngularJS's design goals included:
领英推荐
AngularJS implemented the MVC pattern to separate presentation, data, and logic components.[8] Using dependency injection, Angular brought traditionally server-side services, such as view-dependent controllers, to client-side web applications. Consequently, much of the burden on the server could be reduced. AngularJS used the term "scope" in a manner akin to the fundamentals of computer science.
Scope in computer science describes when in the program a particular binding is valid. The ECMA-262 specification defines scope as: a lexical environment in which a Function object is executed in client-side web scripts;[9] akin to how scope is defined in lambda calculus.[10]
As a part of the "MVC" architecture, the scope forms the "Model", and all variables defined in the scope can be accessed by the "View" as well as the "Controller". The scope behaves as a glue and binds the "View" and the "Controller".
AngularJS is a JavaScript framework designed to extend the syntax of HTML. AngularJS empowers developers to build rich internet applications (RIAs) more easily. Where many JavaScript frameworks focus on expanding the capabilities of JavaScript itself, AngularJS instead provides methods for enhancing HTML. AngularJS is a JavaScript Framework. Angular is the updated version of AngularJS with many major updates and significant changes. Also, Angular is faster compared to AngularJS and offers many advantages such as mobile-friendly applications, cross-platform development, SEO support, and a built-in CLI tool. It provides the capability to create Single Page Application in a very clean and maintainable way. It provides data binding capability to HTML. Thus, it gives user a rich and responsive experience. AngularJS code is unit testable.