-
Notifications
You must be signed in to change notification settings - Fork 12k
Unclear "Linked libraries" document - seeking clarification #7552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's also not clear from the document whether the package.json / tsconfig.json changes are intended to be used in conjunction with or in place of |
There's a bug with angular-cli >= 1.3 at the moment #7409 |
@mpalourdio Thanks for the comment, but unfortunately it doesn't get me past my issue. When I run
Clearly there's something I'm missing. I'm not sure if it is due to unclear / minimal documentation, a lightbulb moment waiting to happen, or... |
@supdegrave your "library" module should be already AOT compiled. Make sure you do not Library structure should follow spec: https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview Easiest is to make a library using some 3rd party starters. For example: https://github.com/jvandemo/generator-angular2-library Then |
@tytskyi Thanks. Is there any supported way to link ( |
@supdegrave i don't think so, see https://github.com/angular/angular-cli/wiki/stories-linked-library#the-library-still-needs-to-be-rebuilt-on-every-change. Also you do not need to publish every time you change code, only publish when it's "done". That's why you want to use Edit: i quickly reviewed linked article: not the best scenario, there is a suggestion to rename file manually and no mention on |
Thanks again, @tytskyi. I'm having a look at that yeoman generator now. |
You can link an external .ts module inside an existing application. I do that with my own modules. I manually symlink my module's root inside my application's node_modules. Changes are taken on the fly without any problem |
@mpalourdio I'd love more details on your exact situation. That sounds like exactly what I'm trying to do, and failing miserably. |
You can give it a try : clone this module : https://github.com/mpalourdio/ng-http-loader Then, in your application, go to nodes_modules, and symlink src/app inside. For example :
Once done, you can import |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Repro steps.
This is mostly a documentation bug, I guess.
I'm trying to pull in a shared module from my local filesystem, outside the scope of my main application, and running into the common
Please add a @NgModule annotation. I'm not here asking about that.
I'm trying to follow the guidelines in the Linked Libraries story, but it feels like there's something missing.
After listing
peerDependencies
anddevDependencies
in the shared module's package.json, and configuringpaths
in the main app's tsconfig.app.json, where's the magic? Is there an impliednpm install
that should happen?Desired functionality.
Very clear steps in the document, along the following:
The text was updated successfully, but these errors were encountered: