I want to take various components from other apps I built (2-3 from one, 3-5 from other) in various tutorials and "import"/use them into an app I am building. (not a multi project workspace).
While I've seen many topics on this, none seem to answer my intermediate coding pallett, except this: Angular 2 : How to include a component from one running Angular project to another Angular project?. The answer is vague.
What would the coding best practice be?
Code-CLI
Main app file structure (initial setup), highlighted components I wish to use:
Note: all done is VSCode & @angular/cli
Method 1
D:/app-root/app]$ ng g c [component-from-2nd-app
I would do this for each component. After that, go back and copy/paste each file...
This method seems wrong or tedious, or am I missing something?
Method 2
Instead of generating a new component, just copy and paste the components, then go into app.module, app.component, app-routing
and up those pages to reflect the changes.
Alternate method?
I'm still learning angular and not totally familiar with 'libraries' - could/should/how would I "collect" components, put them in a library for use in any application I may do or currently am building?
Summarized questions
Which method is best coding practice to use/recreate/import components from another source? And what would the syntax look like?