55785

Angular-cli component generator generate additional files

Is there a way to override the default behavior of the

ng generate component

command? In addition to the files that this command creates by default, I am wanting to have it generate a nested folder and several files within that folder inside the component that is created.

Answer1:

Additional files are generated using additional commands. You can find a reference to it on https://github.com/angular/angular-cli

You can find all possible blueprints in the table below:

+-----------+---------------------------------+ | Scaffold | Usage | +-----------+---------------------------------+ | Component | ng g component my-new-component | +-----------+---------------------------------+ | Directive | ng g directive my-new-directive | +-----------+---------------------------------+ | Pipe | ng g pipe my-new-pipe | +-----------+---------------------------------+ | Service | ng g service my-new-service | +-----------+---------------------------------+ | Class | ng g class my-new-class | +-----------+---------------------------------+ | Interface | ng g interface my-new-interface | +-----------+---------------------------------+ | Enum | ng g enum my-new-enum | +-----------+---------------------------------+ | Module | ng g module my-module | +-----------+---------------------------------+

Recommend

  • Plot a CSV file where the delimiter is '; ' (semicolon + space)
  • How to remove comma or any characters from Python dataframe column name
  • Access Google Maps from outside
  • Getting IIS6 to play nice with WordPress Pretty Permalinks
  • Titanium doesn't recognize Android SDK on Windows
  • Creating JS objects in PHP with commas in between
  • How to use tag-it
  • ckeditor and jquery UI dialog not working
  • Most efficient way to move table rows from one table to another
  • What causes the runtime difference in this trivial fortran code?
  • using System.Speech.Synthesis with Windows10 universal app (XAML-C#)
  • Javascript, Regex - I need to grab each section of a string contained in brackets
  • Laravel: Getting Session ID oddly truncates when using foreach
  • GAE: Way to get reference to an HttpSession from its ID?
  • Spring boot 2.0.0.M4 required a bean named 'entityManagerFactory' that could not be found
  • How to disable all widgets inside Panel or inside Composite?
  • What is the purpose of TaskExecutor in spring?
  • How does document.ready work with angular element directives?
  • Not able to aggregate on nested fields in elasticsearch
  • Reduction and collapse clauses in OMP have some confusing points
  • Paperclip, set path outside of rails root folder
  • Lost migrations and Azure database is now out of sync
  • RectangularRangeIndicator format like triangular using dojo
  • How to set/get protobuf's extension field in Go?
  • Cross-Platform Protobuf Serialization
  • Incrementing object id automatically JS constructor (static method and variable)
  • Cassandra Data Model
  • Trying to switch camera back to front but getting exception
  • Importing jscolor library in angular 2
  • Revoking OAuth Access Token Results in 404 Not Found
  • Proper folder structure for lots of source files
  • Load html files in TinyMce
  • Free memory of cv::Mat loaded using FileStorage API
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • unknown Exception android
  • Append folder name and increment by 1 using batch script
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Is there any way to bind data to data.frame by some index?
  • How can i traverse a binary tree from right to left in java?