Skip to content

Commit

Permalink
fix(@schematics/angular): fix extra comma if inlineStyle is on
Browse files Browse the repository at this point in the history
When generating a new component, if `inlineStyle` and either
`viewEncapsulation` or `changeDetection` flag is provided, there is an
extra comma after `styles: [],,` causing the component to bugged out.
  • Loading branch information
nartc authored and kyliau committed Mar 30, 2020
1 parent 93c2018 commit f902f49
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -14,7 +14,7 @@ import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }
display: block;
}
`<% } %>
],<% } else { %>
]<% } else { %>
styleUrls: ['./<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>,
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
Expand Down

0 comments on commit f902f49

Please sign in to comment.