我正在经历一个 component communication example在 Angular 中然后我看到了这个:
export * from './message.service';
这个导出 Action 的作用是什么,为什么要在另一个不是message.service的文件中完成? (然而在 message.service.ts 中有一个导出服务类的导出函数)
export class MessageService {...
最佳答案
这会重新导出 './message.service'
中的所有内容。这通常是将多个模块打包到一个容器模块中,这样可以更容易地被客户导入。此功能在文档中也称为 Module Redirects
。
关于angular - export *(星号)在 Angular/Typescript 中是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54304197/