我读了一篇article https://medium.com/@michelestieven/organizing-angular-applications-f0510761d65a关于在 Angular 中组织文件夹,作者使用了一个名为core
,他在其中创建核心模块并仅插入将被调用一次的服务。
目前,我正在开展一个项目,因此我采用了article https://medium.com/@michelestieven/organizing-angular-applications-f0510761d65a。在我的里面core
文件夹/模块我创建了一个名为的模块api
:
\app
\core
\api
...
\shared
...
我的问题是:作为api
是一个模块,我想知道为什么不将其从中删除core
并放入app
folder?
\app
\api
\core
\shared
...
Angular 本身有core
模块也是如此(我们导入ngModule
, Injectable
...)我想知道它的作用是什么。
Your 核心模块包含将用于实例化您的应用程序并加载一些核心功能的代码。
要获得更多关于此内容的想法,请阅读Core Module https://frontpills.com/posts/2019/core-shared-modules/#:%7E:text=The%20Core%20Module%20is%20a,in%20the%20application%20can%20use.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)