Skip to main content
Trim chat, fix case
Source Link
halfer
  • 20.2k
  • 19
  • 110
  • 207

I have an Angular Workspace created with three projects. As well as I have just created a Library that I would like to have reusable modules inside.

Typically for the projects (applications and library) I run the following to generate a module or component:

ng g c component componentName --project=UserPortal

ng g c component componentName --project=myLibrary

However Nownow I need to add components to the modules inside them:

For example the Library: projects myLibrary src lib navigation-module Add Component here

For Application Project Module: projects UserPortal src app userModule Add Component Here

I was able to create a module inside the Library project from the Workspace by running:

ng generate module navigation-module --project=myLibrary

Currently I have to go through command line down to that directory just to create a component. But I have a feeling I can do this from the Workspace like all the other commands. This would be most beneficial instead of either having to command lines up or going back and forth between directories.

Quick Overview: Quick overview:

  1. Have a Library created within an Angular Workspace
  2. Created a module inside the LibrraryLibrary within the Angular Workspace
  3. Want to create a component inside the module within the Library from the Workspace

Thanks for your help.

I have an Angular Workspace created with three projects. As well as I have just created a Library that I would like to have reusable modules inside.

Typically for the projects (applications and library) I run the following to generate a module or component:

ng g c component componentName --project=UserPortal

ng g c component componentName --project=myLibrary

However Now I need to add components to the modules inside them:

For example the Library: projects myLibrary src lib navigation-module Add Component here

For Application Project Module: projects UserPortal src app userModule Add Component Here

I was able to create a module inside the Library project from the Workspace by running:

ng generate module navigation-module --project=myLibrary

Currently I have to go through command line down to that directory just to create a component. But I have a feeling I can do this from the Workspace like all the other commands. This would be most beneficial instead of either having to command lines up or going back and forth between directories.

Quick Overview:

  1. Have a Library created within an Angular Workspace
  2. Created a module inside the Librrary within the Angular Workspace
  3. Want to create a component inside the module within the Library from the Workspace

Thanks for your help.

I have an Angular Workspace created with three projects. As well as I have just created a Library that I would like to have reusable modules inside.

Typically for the projects (applications and library) I run the following to generate a module or component:

ng g c component componentName --project=UserPortal

ng g c component componentName --project=myLibrary

However now I need to add components to the modules inside them:

For example the Library: projects myLibrary src lib navigation-module Add Component here

For Application Project Module: projects UserPortal src app userModule Add Component Here

I was able to create a module inside the Library project from the Workspace by running:

ng generate module navigation-module --project=myLibrary

Currently I have to go through command line down to that directory just to create a component. But I have a feeling I can do this from the Workspace like all the other commands. This would be most beneficial instead of either having to command lines up or going back and forth between directories.

Quick overview:

  1. Have a Library created within an Angular Workspace
  2. Created a module inside the Library within the Angular Workspace
  3. Want to create a component inside the module within the Library from the Workspace
Source Link
L1ghtk3ira
  • 3.2k
  • 9
  • 38
  • 70

Angular Library Module generate a component from workspace

I have an Angular Workspace created with three projects. As well as I have just created a Library that I would like to have reusable modules inside.

Typically for the projects (applications and library) I run the following to generate a module or component:

ng g c component componentName --project=UserPortal

ng g c component componentName --project=myLibrary

However Now I need to add components to the modules inside them:

For example the Library: projects myLibrary src lib navigation-module Add Component here

For Application Project Module: projects UserPortal src app userModule Add Component Here

I was able to create a module inside the Library project from the Workspace by running:

ng generate module navigation-module --project=myLibrary

Currently I have to go through command line down to that directory just to create a component. But I have a feeling I can do this from the Workspace like all the other commands. This would be most beneficial instead of either having to command lines up or going back and forth between directories.

Quick Overview:

  1. Have a Library created within an Angular Workspace
  2. Created a module inside the Librrary within the Angular Workspace
  3. Want to create a component inside the module within the Library from the Workspace

Thanks for your help.