More How To Tutorials or More Detailed Tutorials #5543
webmandman
started this conversation in
General
Replies: 1 comment
-
Ok I found this article. Which helped me solve my problem. I was not adding another export * to the index.ts file. https://labs.thisdot.co/blog/angular-libraries-with-nx-for-enterprise-apps I still think more detailed tutorials are needed from Nrwl. if you docs website is public repo, I wouldn't mind adding some stuff. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't figure out how to make a Service (which does angular/http) shareable from a lib module.
I ran
nx g service user --module=api --project=api --export
to generate a shareable service. It doesn't it to the smarty module which was generated withnx g @nrwl/angular:lib api
.So I just import it into smarty.module.ts and added to the exports array.
Now I want to use "UserService" in my application. My app's module can
import { ApiModule } from '@myorg/api'
without error. So how to I do I import the UserService. I have triedimport { UserService } from '@myorg/api'
but I get the error "@myorg/api" has no exported member called "UserService".An tutorial for creating shareable services would be nice. But can someone here help me setup a service please?
Beta Was this translation helpful? Give feedback.
All reactions