Angular2 import components/services from module

随声附和 提交于 2019-12-05 08:51:29

Services dont need to be added to the exports of a NgModule.

provide them inside of your CoreModule or like now inside of your AppModule, but import them from their original File...

Or add an export {AuthService} from '..File..' to your CoreModule.

You can only import Components and Services from a File where they are exported. And Not where they are in the exports section of a Module.. It's an Typescript thing and not an Angular thing! :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!