什么是NG代表在Angular.js指令 [英] What does the ng stand for in Angular.js directives

查看:124
本文介绍了什么是NG代表在Angular.js指令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Angular.js使用几种不同的指令prefixed与纳克象下面这样:

Angular.js uses several directives prefixed with ng like below:

纳克(基本指令)

ng-switch
ng-repeat
ng-view

我想知道是否有人知道纳克主张,因为我无法在文档中找到它。它是什么东西的缩写?

I was wondering if anyone knew what ng stood for because I couldn't find it in the docs. Is it an acronym for something?

推荐答案

在preFIX 纳克表示角;所有的内置指令与该preFIX角使用船上的。同样的,建议您的的使用纳克 preFIX您的的为了指令来避免折角未来的版本中可能的名称冲突。

The prefix ng stands for "Angular;" all of the built-in directives that ship with Angular use that prefix. Similarly, it is recommended that you do not use the ng prefix on your own directives in order to avoid possible name collisions in future versions of Angular.

FAQ :

为什么被称为AngularJS这个项目?为什么叫命名空间NG?

由于HTML有角括号和NG听起来像角。

Because HTML has Angular brackets and "ng" sounds like "Angular".

这篇关于什么是NG代表在Angular.js指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆