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