AngularJS Chinese Reference Manual

Read(23977) update time(2022-04-13)

In the "AngularJS Chinese Reference Manual", AngularJS extends HTML with new attributes and expressions. AngularJS can build a single page application (SPAs: Single Page Applications). AngularJS is very easy to learn.


AngularJS is an open source JavaScript library maintained by Google to help single-page applications run. Its goal is to enhance browser-based applications through the MVC pattern (MVC) functionality to make development and testing easier. After the major changes in version 2 (the most prominent change was the full use of TypeScript), it was renamed Angular, and version N was named in the form of Angular N.

The library reads HTML that contains additional customizations (tag attributes), follows the instructions in these custom attributes, and binds the input or output in the page to the model represented by JavaScript variables. The values ​​of these JavaScript variables can be set manually or obtained from static or dynamic JSON resources.

Tips: Before you start learning AngularJS, you need to have the basics of HTML, CSS, JavaScript Knowledge.

Let’s run the first AngularJS instance!

The first AngularJS instance

Instance

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>

<div ng-app="">
  <p>名字 : <input type="text" ng-model="name"></p>
  <h1>Hello {{name}}</h1>
</div>

</body>
</html>

Run instance»

Click "Run instance" " button to view online examples

Angular follows the MVC pattern of software engineering and encourages loose coupling between presentation, data, and logical components. Through dependency injection, Angular brings traditional server-side services, such as view-independent control, to client-side web applications. Therefore, a lot of burden is reduced on the backend, resulting in a lighter web application.

Tips: Our AngularJS tutorial will help you learn step by step how to master and use AngularJS. If you have any questions, please go to the PHP Chinese website AngularJS CommunityAsk your questions and enthusiastic netizens will answer them for you.

Main Features of AngularJS

  • AngularJS simplifies application development by presenting a higher level of abstraction to developers. As with other abstraction techniques, some flexibility is lost. In other words, not all applications are suitable for AngularJS.

  • AngularJS mainly considers building CRUD applications. Fortunately, at least 90% of WEB applications are CRUD applications. But to understand what is suitable for building with AngularJS, you need to understand what is not suitable for building with AngularJS.

  • For example, games, graphical interface editors, applications with frequent and complex DOM operations are very different from CRUD applications, and they are not suitable to be built with AngularJS. In situations like this it might be better to use some lighter, simpler technology like jQuery.

AngularJS design goals:

  • Decouple application logic from operations on the DOM. This improves the testability of your code.

  • Take the testing of your application as important as the writing of your application. The way your code is structured has a huge impact on how difficult it is to test.

  • Decouple the client and server of the application. This allows client and server development to go hand in hand and enables reuse on both sides.

  • Guide developers through the entire process of building an application: from designing the user interface, to writing business logic, to testing.

What this AngularJS tutorial manual covers

This AngularJS tutorial manual covers all basic usage methods of React, including AngularJS expressions, AngularJS instructions, AngularJS models, and AngularJS controls Detailed knowledge of AngularJS tables, AngularJS events, AngularJS modules, AngularJS animations, AngularJS dependency injection, AngularJS routing, etc.

Tips: Each chapter of this tutorial contains many AngularJS examples. You can directly click the "Run Example" button to view the results online. These examples will help you better understand and use AngularJS.

Latest chapter


AngularJS 参考手册 2016-10-19
AngularJS 2016-10-19
AngularJS 应用 2016-10-19
AngularJS 路由 2016-10-19
AngularJS 依赖注入 2016-10-19
AngularJS 动画 2016-10-19
AngularJS 包含 2016-10-19
AngularJS Bootstrap 2016-10-19