The question is pretty short: is this possible to run a schematic without the CLI, meaning within my code? Like so:
import { Component} from '@angular/core';
@Component({
selector: 'app-name',
templateUrl: './name.component.html',
styleUrls: ['./name.component.scss']
})
export class NameComponent {
myMethod() {
runSchematic(
{
type: 'generate component',
name: 'my-component'
}
);
}
}
This is obvioulsy some pseudo code I just wrote, the question is mainly about the possibility of running schematics programmatically. Thanks!