什么是Angular?
novakon2016/01/18软件综合 IP:广东
翻译自Angular官网。

What Is Angular?
什么是Angular?


AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.
AngularJS 是为动态Web应用准备的一个结构化框架。它允许你使用HTML作为你的模板语言,同时允许你扩展HTML的语法以清晰而简练地描述你应用中的各种组件。Angular的【数据绑定】以及【依赖注入】让你省下了原本需要撰写的大多数代码。尤其是它完全在浏览器内部进行,因此可以理想地与任何服务器技术相结合。

Angular is what HTML would have been, had it been designed for applications. HTML is a great declarative language for static documents. It does not contain much in the way of creating applications, and as a result building web applications is an exercise in what do I have to do to trick the browser into doing what I want?
如果HTML当初是为应用而设计的,现在它一定长得像Angular。HTML非常适合用于描述静态文档。而在应用设计方面HTML却没有什么内涵,后果就是让Web应用开发变成了一种“怎样让浏览器听俺使唤”的重复劳动。

The impedance mismatch between dynamic applications and static documents is often solved with:
这种动态应用和静态文档之间的阻抗不匹配,常常通过以下方式解决:

a library - a collection of functions which are useful when writing web apps. Your code is in charge and it calls into the library when it sees fit. E.g., jQuery.
一个库 - 一堆对于开发Web应用有用的函数。你的代码主持大局,什么时候需要什么时候调用库函数。比如jQuery。

frameworks - a particular implementation of a web application, where your code fills in the details. The framework is in charge and it calls into your code when it needs something app specific. E.g., durandal, ember, etc.
各种框架 - 框架是Web应用的一种特定实现,你的代码负责在里面补充细节。框架主持大局,遇到与应用相关的细节的时候调用你的代码。这类的例子有durandal,ember,等等。

Angular takes another approach. It attempts to minimize the impedance mismatch between document centric HTML and what an application needs by creating new HTML constructs. Angular teaches the browser new syntax through a construct we call directives. Examples include:
然而Angular另辟蹊径。它费尽心机,令以文档为中心的HTML,和应用程序通过创建新HTML结构以完成的那些需求,之间的阻抗实现尽量匹配。Angular通过一种我们叫做directive的构造来让浏览器掌握新的语法。

Data binding, as in pw_.
数据绑定用花括号实现。

DOM control structures for repeating, showing and hiding DOM fragments.
DOM控制结构可以实现重复、显示以及隐藏DOM片段。

Support for forms and form validation.
支持表单以及表单验证。

Attaching new behavior to DOM elements, such as DOM event handling.
给DOM元素增添新的行为,比如DOM事件处理。

Grouping of HTML into reusable components.
将HTML打包成可以重用的组件。
来自:计算机科学 / 软件综合
2
已屏蔽 原因:{{ notice.reason }}已屏蔽
{{notice.noticeContent}}
~~空空如也
张静茹
8年3个月前 IP:江苏
804874
翻译的很棒,对比翻译的风格也很好
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论

想参与大家的讨论?现在就 登录 或者 注册

所属专业
上级专业
同级专业
novakon
学者 机友 笔友
文章
1256
回复
8385
学术分
16
2008/03/29注册,2年2个月前活动

已走,勿送

主体类型:个人
所属领域:无
认证方式:手机号
IP归属地:未同步
文件下载
加载中...
{{errorInfo}}
{{downloadWarning}}
你在 {{downloadTime}} 下载过当前文件。
文件名称:{{resource.defaultFile.name}}
下载次数:{{resource.hits}}
上传用户:{{uploader.username}}
所需积分:{{costScores}},{{holdScores}}下载当前附件免费{{description}}
积分不足,去充值
文件已丢失

当前账号的附件下载数量限制如下:
时段 个数
{{f.startingTime}}点 - {{f.endTime}}点 {{f.fileCount}}
视频暂不能访问,请登录试试
仅供内部学术交流或培训使用,请先保存到本地。本内容不代表科创观点,未经原作者同意,请勿转载。
音频暂不能访问,请登录试试
支持的图片格式:jpg, jpeg, png
插入公式
评论控制
加载中...
文号:{{pid}}
投诉或举报
加载中...
{{tip}}
请选择违规类型:
{{reason.type}}

空空如也

加载中...
详情
详情
推送到专栏从专栏移除
设为匿名取消匿名
查看作者
回复
只看作者
加入收藏取消收藏
收藏
取消收藏
折叠回复
置顶取消置顶
评学术分
鼓励
设为精选取消精选
管理提醒
编辑
通过审核
评论控制
退修或删除
历史版本
违规记录
投诉或举报
加入黑名单移除黑名单
查看IP
{{format('YYYY/MM/DD HH:mm:ss', toc)}}