(这里给出的API引用:http://docs.angularjs.org/api分为几个模块。 每个模块都有它的一组指令、服务、过滤器。
我想知道这些术语(即指令、服务、模块等)是什么意思以及它们在典型的网络中扮演什么 Angular 色-使用 angularJS 制作的应用程序 ?
最佳答案
“服务”在 https://docs.angularjs.org/guide/services 中有解释。 .
Angular services are substitutable objects that are wired together using dependency injection (DI). You can use services to organize and share code across your app.
“指令”在 http://docs.angularjs.org/guide/directive 中有解释。 .
Directives are a way to teach HTML new tricks. During DOM compilation directives are matched against the HTML and executed. This allows directives to register behavior, or transform the DOM.
“模块”在 http://docs.angularjs.org/guide/module 中有解释。 .
Most applications have a main method which instantiates, wires, and bootstraps the application. Angular apps don't have a main method. Instead modules declaratively specify how an application should be bootstrapped.
我只是在这个答案中包含摘要。您可能需要更多详细信息,在这种情况下,请点击链接并查看文档。
关于javascript - angularJS 文档中的各种术语是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11603030/