ng g c new component code example Example 1: ng generate new component ng generate <schematic> [options] Example 2: ng g component ng g class <name> [options]