简体   繁体   English

ngf前缀在angularjs和ng-file-upload中是什么意思?

[英]What does ngf prefix mean in angularjs and ng-file-upload?

I've come across an ngf-select directive in ng-file-upload for AngularJS. 我在AngularJS的ng-file-upload中遇到了ngf-select指令。 It's used like 就像

<button type="file" ngf-select="uploadFiles($file, $invalidFiles)"
        accept="image/*" ngf-max-height="1000" ngf-max-size="1MB">
   Select File
</button>

I managed to find very little info on what it stands for. 我设法找到关于它代表什么的信息很少。 I can only guess it's something like an if-condition on select event. 我只能猜测这类似于select事件中的if条件。 I pretty sure I've missed some part in the docs and I don't want to get by with guessing. 我很确定我已经错过了文档中的某些内容,并且我不想猜测。

Can anyone explain what do ngf prefixes do and probably give a link to documentation? 谁能解释ngf前缀的作用,并可能提供指向文档的链接?

Well there is a lot of discussion about this but majority of people say's that The prefix ng stands for "Angular;" 对此有很多讨论,但是大多数人都说前缀ng代表“ Angular”。 all of the built-in directives that ship with Angular use that prefix. Angular附带的所有内置指令都使用该前缀。 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.As like this "ngf" is the in built directive of file uploaing 同样,建议您不要在自己的指令上使用ng前缀,以避免在Angular的未来版本中可能发生名称冲突。就像“ ngf”是文件uploaing的内置指令一样

And some say that ng just sounds like Angular 有人说ng听起来像Angular

some may saying that ng stands for "Next Generation" as the angular is booming with its features .... 有人可能会说ng代表“下一代”,因为其功能不断发展。

please check this 请检查一下

https://docs.angularjs.org/api/ng

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM