ng component command code example Example 1: angular generate component ng g component componentname Example 2: ng g component ng g class [options]