ng generate

noun

say it: “EN-JEE JEN-er-ayt” /ˌɛn ˈdʒiː ˈdʒɛnəreɪt/

The Angular CLI command that creates a new component, service or other part with its files.

What is ng generate in Angular?

ng generate — The Angular CLI command that creates a new component, service, guard or pipe with all its files, named and wired up the standard way. ng g c is its short form for a component.

ng generate component product-card
# CREATE src/app/product-card/product-card.ts (and .html, .css, .spec.ts)

In a sentence

  • “ng generate component product-card made the class, template, styles and test.”

Level: Novice · More Angular terms at this level

Updated