Core文件怎么查看:Angular:core.module样式怎么了

Tl;drcore.module样式似乎不再是官方Angular Style Guide的一部分,但它必须是最近才被删除的。

我刚刚阅读了this关于开始使用 Angular Material 的指南,它指出

    Then (as per the Angular Style Guide) I created a Core module

我检查了Style Guide,但似乎找不到这里引用的指南。在我的搜索过程中,我偶然发现了以下来源:

A blogpost来自18 年 11 月解释 core.module 和 shared.module 之间的区别。

This question来自17 年 10 月,其中非常详细地解释了 core.module。

This question来自18 年 7 月,未被注意到。

最后一个问题是指core.module风格与此链接:

    https://angular.io/guide/styleguide#core-feature-module

看来#core-feature-module锚已被删除,不再是官方 Angular 风格指南的一部分。只剩下shared feature module guideline

为什么删除了core.module准则?导入服务等单例的新最佳实践是什么?

1

嗯,简单地说never been required

您也可以完全删除以下文件。它们是 AngularJS 模块配置文件,在 Angular 中不需要:

app / app.module.ajs.ts

app / app.config.ts

app / core / core.module.ts

app / core / phone / phone.module.ts

app / phone-detail / phone-detail.module.ts

app / phone-list / phone-list.module.ts

至于reason why it got removed

@ jenniferfell @ brandonroberts fyi。@ jenniferfell 我们删除了CoreModule作为推荐的技术,因为现在提供服务的首选方式是使用providedIn,但是 @ bisonfoutu 有一个很好的观点。我认为这个问题的重点可能最适合于 Feature Modules 或SharedModule社区

国际海事组织,我们得出的结论是我们应该建议这种技术:https://angular.io/guide/styleguide#shared-feature-module

感谢您提交此问题,@ bisonfoutu!!

欢迎有想法!

本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处

(57)
C++遍历:遍历无序映射 C++(iterate through unordered_map c++)
上一篇
Python生成器和迭代器理解:Python3:不是生成器的迭代器
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(50条)