Skip to content

Commit b928d97

Browse files
eltonc-devclydin
authored andcommitted
fix(@schematics/angular): alphabetically order imports during component generation
change the order of imports during component generation using changeDetectionStrategy set to OnPush closes #23156 (cherry picked from commit d899091)
1 parent 587082f commit b928d97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%><% if(changeDetection !== 'Default') { %>, ChangeDetectionStrategy<% }%> } from '@angular/core';<% if(standalone) {%>
1+
import { <% if(changeDetection !== 'Default') { %>ChangeDetectionStrategy, <% }%>Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%> } from '@angular/core';<% if(standalone) {%>
22
import { CommonModule } from '@angular/common';<% } %>
33

44
@Component({<% if(!skipSelector) {%>

0 commit comments

Comments
 (0)