diff --git a/projects/ngssm-schematics/schematics/component/files/__name@dasherize__.component.ts.template b/projects/ngssm-schematics/schematics/component/files/__name@dasherize__.component.ts.template index 442c2317..c4181d96 100644 --- a/projects/ngssm-schematics/schematics/component/files/__name@dasherize__.component.ts.template +++ b/projects/ngssm-schematics/schematics/component/files/__name@dasherize__.component.ts.template @@ -4,9 +4,8 @@ import { CommonModule } from '@angular/common';<% } %> import { NgSsmComponent, Store } from 'ngssm-store'; @Component({<% if(!skipSelector) {%> - selector: '<%= selector %>',<%}%><% if(standalone) {%> - standalone: true, - imports: [CommonModule],<%}%><% if(inlineTemplate) { %> + selector: '<%= selector %>',<%}%> + imports: [CommonModule],<% if(inlineTemplate) { %> template: `

<%= dasherize(name) %> works! diff --git a/projects/ngssm-schematics/schematics/component/index.ts b/projects/ngssm-schematics/schematics/component/index.ts index df504d65..d749e6d7 100644 --- a/projects/ngssm-schematics/schematics/component/index.ts +++ b/projects/ngssm-schematics/schematics/component/index.ts @@ -53,6 +53,7 @@ export function component(options: AngularComponentOptionsSchema): Rule { // component selector angularComponentOptions.selector = angularComponentOptions.selector || buildSelector(angularComponentOptions, (project && project.prefix) || ''); + angularComponentOptions.standalone = true; const componentPath = `/${angularComponentOptions.path}/` + (angularComponentOptions.flat ? '' : strings.dasherize(angularComponentOptions.name) + '/');