简体   繁体   中英

angular third party modules imported with forroot

There are many third party angular libraries that are imported using forRoot method, and I was wondering if it is ok to import them inside my core module, instead of inside my app module, provided that my core module is meant to be imported only into the app module. I presume that forRoot is intended to keep the module services as singletons, so there shouldn't be a problem, right? Thanks.

是的,如果您仅在AppModule中导入CoreModule。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM