the Nested Modules in AngularJS

前端 未结 1 871
情话喂你
情话喂你 2021-02-07 22:45

Background

I have N angular modules. One of them it is the root container that bootstrapped on and exists whole page life cycle. All other N-1 are games that nested i

相关标签:
1条回答
  • 2021-02-07 23:34

    Oh! I just realized you idea. Actually you have incorrect understanding of Angular building components.

    1. Angular module is just a logical wrapper for controllers, directives, factories and etc. For example you would have module 'main' and several submodules 'moduleA' and 'moduleB'

    They doesn't have any relation to the modules on a markup, it's just a logical unit in your app.

    1. In your example you hopefully mean scopes. You may have several scopes in your app and they can be inhireted or have children. And in this case you can load or unload entity that created the scope

    Look at the official developer guide for more details.

    0 讨论(0)
提交回复
热议问题