Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7,633 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

###zh-CN

readme.md

  <article class="markdown-body entry-content" itemprop="text"><h1><a id="user-content-angularjs-" class="anchor" href="#angularjs-" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" role="img" version="1.1" viewBox="0 0 16 16" width="16"><path d="M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z"></path></svg></a><trans data-src="AngularJS " data-dst="AngularJS">AngularJS</trans><a href="https://travis-ci.org/angular/angular.js"><img src="https://camo.githubusercontent.com/cc790c12ed8699e6e9fdb9a37e297fb9afde5c3b/68747470733a2f2f7472617669732d63692e6f72672f616e67756c61722f616e67756c61722e6a732e7376673f6272616e63683d6d6173746572" alt="Build Status" data-canonical-src="https://travis-ci.org/angular/angular.js.svg?branch=master" style="max-width:100%;"></a></h1>

AngularJS让你写客户端的Web应用程序,如果你有一个聪明的浏览器。它可以让你 使用老的HTML(或HAML、玉和朋友!)作为你的模板语言,让你 扩展HTML的语法来表达你的应用程序组件清晰、简洁。它会自动 同步数据从你的用户界面(视图)与你的JavaScript对象(模型) 通过双向数据绑定。帮助你构建你的应用程序更易于测试,AngularJS教 浏览器如何做依赖注入和控制反转。

哦,是的,它有助于与服务器端的通信,利用异步回调承诺和 延迟。这也使得客户端导航deeplinking与名URL或一块蛋糕 HTML5 pushstate。最好呢?它使开发的乐趣?!

建筑AngularJS

一旦你有你的环境设置只要运行:

咕噜包

运行测试

执行所有的单元测试,使用:

咕噜:单元测试

执行端到端(E2E)的测试,使用:

咕噜咕噜包
试验:端到端

要了解更多关于这繁重的任务,运行咕噜——帮助也看我们贡献原则

Analytics

什么用AngularJS和何时使用它

AngularJS是下一代的架构,每个组件的设计与在一个相互联系的方式,像一个运转良好的机器各部件工作等。AngularJS是JavaScript MVC使容易,做的好。(这是不是真的MVC,阅读,理解这意味着什么。)

MVC,不,MV *做了正确的方式!

MVC模型视图控制器,是一种设计模式,即代码如何组织以及如何正确应用分离的可读性和调试的不同部分。模型是数据和数据库。视图是用户界面和用户所看到的。控制器是模型与视图之间的主要连接。这些都是三大主要的编程框架,目前市场上的今天。另一方面,AngularJS作品MV,模型视图短—无论什么。这个无论什么是AngularJS的方式告诉你可以创造任何一种之间的模型和视图来连接。

不同于任何编程语言,在MVC框架,三个独立的部分组成,每一个都是由程序员写,然后连接,AngularJS帮助程序员问他/她只创建这些以及其他的一切就由AngularJS。

与基层的HTML互连

AngularJS使用HTML来定义用户界面。AngularJS还允许程序员编写新的HTML标签(AngularJS指令)和增加代码的可读性和可理解性。指令AngularJS的方式带来的附加功能的HTML。指令实现这使我们能够创造我们自己的HTML元素。这也有助于使代码干(不要重复自己),这意味着一旦创建,一个新的指令,可以应用在任何地方使用。

数据处理变得简单

在AngularJS数据和数据模型是纯JavaScript对象和一个可以添加和更改属性直接和它的对象和数组在循环。

双向数据绑定

一个AngularJS的最强特征。双向数据绑定,如果在模型中有变化,变化反映到视图的瞬间,和同样在其他方面发生。这也被称为无功规划,即假设a = b + c被编程之后,如果价值B和/或C然后变的价值A将自动更新以反映变化。AngularJS使用其“范围”的模型和视图之间的胶水使这些更新在一个可供其他。

少写代码和易维护的代码

一切在AngularJS创建使程序员写出来的代码量少,易于维护和可读的团队中的其他人。相信它或没有,一个能在不到10行代码写一个完整的工作的双向数据绑定的应用。试试看吧!

测试准备

AngularJS是依赖注入,即负责提供所有必须的依赖其控制器需要时。这有助于利用模拟依赖创造使得AngularJS代码准备单元测试和注射。这使得AngularJS更加模块化,从而帮助团队创造更强大的应用程序容易测试。

###EN AngularJS [![Build Status](https://travis-ci.org/angular/angular.js.svg?branch=master)](https://travis-ci.org/angular/angular.js) =========

AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding. To help you structure your application better and make it easy to test, AngularJS teaches the browser how to do dependency injection and inversion of control.

Oh yeah and it helps with server-side communication, taming async callbacks with promises and deferreds. It also makes client-side navigation and deeplinking with hashbang urls or HTML5 pushState a piece of cake. Best of all?? It makes development fun!

Building AngularJS

Once you have your environment set up just run:

grunt package

Running tests

To execute all unit tests, use:

grunt test:unit

To execute end-to-end (e2e) tests, use:

grunt package
grunt test:e2e

To learn more about the grunt tasks, run grunt --help and also read our contribution guidelines.

Analytics

What to use AngularJS for and when to use it

AngularJS is the next generation framework where each component is designed to work with every other component in an interconnected way like a well-oiled machine. AngularJS is JavaScript MVC made easy and done right. (Well it is not really MVC, read on, to understand what this means.)

MVC, no, MV* done the right way!

MVC, short for Model-View-Controller, is a design pattern, i.e. how the code should be organized and how the different parts of an application separated for proper readability and debugging. Model is the data and the database. View is the user interface and what the user sees. Controller is the main link between Model and View. These are the three pillars of major programming frameworks present on the market today. On the other hand AngularJS works on MV*, short for Model-View-Whatever. The Whatever is AngularJS's way of telling that you may create any kind of linking between the Model and the View here.

Unlike other frameworks in any programming language, where MVC, the three separate components, each one has to be written and then connected by the programmer, AngularJS helps the programmer by asking him/her to just create these and everything else will be taken care of by AngularJS.

Interconnection with HTML at the root level

AngularJS uses HTML to define the user's interface. AngularJS also enables the programmer to write new HTML tags (AngularJS Directives) and increase the readability and understandability of the HTML code. Directives are AngularJS’s way of bringing additional functionality to HTML. Directives achieve this by enabling us to invent our own HTML elements. This also helps in making the code DRY (Don't Repeat Yourself), which means once created, a new directive can be used anywhere within the application.

Data Handling made simple

Data and Data Models in AngularJS are plain JavaScript objects and one can add and change properties directly on it and loop over objects and arrays at will.

Two-way Data Binding

One of AngularJS's strongest features. Two-way Data Binding means that if something changes in the Model, the change gets reflected in the View instantaneously, and the same happens the other way around. This is also referred to as Reactive Programming, i.e. suppose a = b + c is being programmed and after this, if the value of b and/or c is changed then the value of a will be automatically updated to reflect the change. AngularJS uses its "scopes" as a glue between the Model and View and makes these updates in one available for the other.

Less Written Code and Easily Maintainable Code

Everything in AngularJS is created to enable the programmer to end up writing less code that is easily maintainable and readable by any other new person on the team. Believe it or not, one can write a complete working two-way data binded application in less than 10 lines of code. Try and see for yourself!

Testing Ready

AngularJS has Dependency Injection, i.e. it takes care of providing all the necessary dependencies to its controllers whenever required. This helps in making the AngularJS code ready for unit testing by making use of mock dependencies created and injected. This makes AngularJS more modular and easily testable thus in turn helping a team create more robust applications.

About

提高Web应用程序的HTML

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages