[英]Is Barrel (index.ts) deprecated from Angular 6?
In Angular2, we made use of index.ts files extensively to make the import and export statements simpler. 在Angular2中,我们广泛使用index.ts文件来简化导入和导出语句。
Since we are upgrading to Angular6 , getting a lot of circular dependency issues. 由于我们正在升级到Angular6 ,因此出现了很多循环依赖问题。 The moment we remove or ignore these index.ts files, then all those dependency issues are getting resolved.
从删除或忽略这些index.ts文件的那一刻起,所有这些依赖关系问题都将得到解决。
So we would like to know that, is Barrel (index.ts) no more used in Angular6? 因此,我们想知道, Angular6中不再使用Barrel(index.ts)了吗?
If still getting used, then is there any changes, the way it was used before? 如果仍在使用,那么是否有改变,如以前的使用方式?
它们不被弃用,只是不要从同一目录中引用它们,这意味着不要从导出当前文件的桶中导入符号,而从文件本身导入 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.