ng g c project code example Example 1: angular generate component ng g component componentname Example 2: ng generate component ng g component [component name]