search

Home  >  Q&A  >  body text

angular.js - angular 的指令和插件有什么区别?

angular 的指令和插件有什么区别?

PHP中文网PHP中文网2744 days ago545

reply all(2)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-15 17:11:20

    Angular is dependent on injection. Generally, a plug-in is a module of angular.module, and then defines some services or instructions (maybe more than one), and then uses it, such as angular.module("myApp",["ngRoute"]) introduced like this, so generally a plug-in (or a module) is Generated by a combination of multiple instructions, multiple services, etc. .

    reply
    0
  • 怪我咯

    怪我咯2017-05-15 17:11:20

    angular.module is the import of the overall module and the dependency injection of provider, server and other plug-ins, which means that the API exposed by the module can be used by the app.
    The directive is also part of the overall module and is used in the view part of the mvc in the app

    reply
    0
  • Cancelreply