angular create file code example

Example 1: angular cli generate new module

ng generate module module-name

Example 2: comand component create struct angular

ng g component [directory-where-you-want-to-save-the-component]/[new-component-name]

ng generate component [directory-where-you-want-to-save-the-component]/[new-component-name]

Example 3: workspace angular

content_copy
      
      my-workspace/
  ...             (workspace-wide config files)
  projects/       (generated applications and libraries)
    my-first-app/ --(an explicitly generated application)
      ...         --(application-specific config)
      e2e/        ----(corresponding e2e tests)
         src/     ----(e2e tests source)
         ...      ----(e2e-specific config)
      src/        --(source and support files for application)
    my-lib/       --(a generated library)
      ...         --(library-specific config)
      src/        --source and support files for library)