|
1 | | -import { <% if(changeDetection !== 'OnPush') { %>ChangeDetectionStrategy, <% }%>Component<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%> } from '@angular/core'; |
| 1 | +import { <% if (changeDetection !== 'OnPush') { %>ChangeDetectionStrategy, <% } %>Component<% if (!!viewEncapsulation) { %>, ViewEncapsulation<% } %> } from '@angular/core'; |
2 | 2 |
|
3 | | -@Component({<% if(!skipSelector) {%> |
4 | | - selector: '<%= selector %>',<%}%><% if(standalone) {%> |
5 | | - imports: [],<%} else { %> |
6 | | - standalone: false,<% }%><% if(inlineTemplate) { %> |
| 3 | +@Component({<% if (changeDetection !== 'OnPush') { %> |
| 4 | + changeDetection: ChangeDetectionStrategy.<%= changeDetection %>,<% } %><% if (!!viewEncapsulation) { %> |
| 5 | + encapsulation: ViewEncapsulation.<%= viewEncapsulation %>,<% } %><% if (standalone) { %> |
| 6 | + imports: [],<% } %><% if (!skipSelector) { %> |
| 7 | + selector: '<%= selector %>',<% } %><% if (!standalone) { %> |
| 8 | + standalone: false,<% } %><% if (inlineStyle) { %> |
| 9 | + styles: `<% if (displayBlock) { %> |
| 10 | + :host { |
| 11 | + display: block; |
| 12 | + } |
| 13 | + <% } %>`,<% } else if (style !== 'none') { %> |
| 14 | + styleUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>',<% } %><% if (inlineTemplate) { %> |
7 | 15 | template: ` |
8 | 16 | <p> |
9 | 17 | <%= dasherize(name) %> works! |
10 | 18 | </p> |
11 | 19 | `,<% } else { %> |
12 | | - templateUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %><%= ngext %>.html',<% } if(inlineStyle) { %> |
13 | | - styles: `<% if(displayBlock){ %> |
14 | | - :host { |
15 | | - display: block; |
16 | | - } |
17 | | - <% } %>`,<% } else if (style !== 'none') { %> |
18 | | - styleUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>',<% } %><% if(!!viewEncapsulation) { %> |
19 | | - encapsulation: ViewEncapsulation.<%= viewEncapsulation %>,<% } if (changeDetection !== 'OnPush') { %> |
20 | | - changeDetection: ChangeDetectionStrategy.<%= changeDetection %>,<% } %> |
| 20 | + templateUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %><%= ngext %>.html',<% } %> |
21 | 21 | }) |
22 | | -export <% if(exportDefault) {%>default <%}%>class <%= classifiedName %> { |
23 | | - |
| 22 | +export <% if (exportDefault) { %>default <% } %>class <%= classifiedName %> { |
24 | 23 | } |
0 commit comments