mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(schematics): two consecutive commas generated (#14371)
When generating any Material schematic with OnPush changeDetection, we get two consecutive commas in component decorator. Fixes: #14366
This commit is contained in:
+2
-2
@@ -9,8 +9,8 @@ import { FormBuilder, Validators } from '@angular/forms';
|
||||
templateUrl: './<%= dasherize(name) %>.component.html',<% } if(inlineStyle) { %>
|
||||
styles: [`
|
||||
<%= indentTextContent(resolvedFiles.stylesheet, 4) %>
|
||||
`],<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>'],<% } %><% if(!!viewEncapsulation) { %>
|
||||
`]<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>']<% } %><% if(!!viewEncapsulation) { %>,
|
||||
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
|
||||
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
|
||||
})
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ import { Breakpoints, BreakpointObserver } from '@angular/cdk/layout';
|
||||
templateUrl: './<%= dasherize(name) %>.component.html',<% } if(inlineStyle) { %>
|
||||
styles: [`
|
||||
<%= indentTextContent(resolvedFiles.stylesheet, 4) %>
|
||||
`],<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>'],<% } %><% if(!!viewEncapsulation) { %>
|
||||
`]<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>']<% } %><% if(!!viewEncapsulation) { %>,
|
||||
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
|
||||
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
|
||||
})
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@ import { map } from 'rxjs/operators';
|
||||
templateUrl: './<%= dasherize(name) %>.component.html',<% } if(inlineStyle) { %>
|
||||
styles: [`
|
||||
<%= indentTextContent(resolvedFiles.stylesheet, 4) %>
|
||||
`],<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>'],<% } %><% if(!!viewEncapsulation) { %>
|
||||
`]<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>']<% } %><% if(!!viewEncapsulation) { %>,
|
||||
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
|
||||
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
|
||||
})
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ import { <%= classify(name) %>DataSource } from './<%= dasherize(name) %>-dataso
|
||||
templateUrl: './<%= dasherize(name) %>.component.html',<% } if(inlineStyle) { %>
|
||||
styles: [`
|
||||
<%= indentTextContent(resolvedFiles.stylesheet, 4) %>
|
||||
`],<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>'],<% } %><% if(!!viewEncapsulation) { %>
|
||||
`]<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>']<% } %><% if(!!viewEncapsulation) { %>,
|
||||
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
|
||||
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
|
||||
})
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ export interface FlatTreeNode {
|
||||
templateUrl: './<%= dasherize(name) %>.component.html',<% } if (inlineStyle) { %>
|
||||
styles: [`
|
||||
<%= indentTextContent(resolvedFiles.stylesheet, 4) %>
|
||||
`],<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>'],<% } %><% if (!!viewEncapsulation) { %>
|
||||
`]<% } else { %>
|
||||
styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>']<% } %><% if(!!viewEncapsulation) { %>,
|
||||
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
|
||||
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user