PR Close #22975
This commit is contained in:
Veres Lajos
2018-03-10 17:14:58 +00:00
committed by Matias Niemelä
parent f739f756ce
commit de90314304
62 changed files with 112 additions and 108 deletions

View File

@ -162,11 +162,11 @@ export class DirectiveNormalizer {
stylesheets: Map<string, CompileStylesheetMetadata>): CompileTemplateMetadata {
// Algorithm:
// - produce exactly 1 entry per original styleUrl in
// CompileTemplateMetadata.externalStylesheets whith all styles inlined
// CompileTemplateMetadata.externalStylesheets with all styles inlined
// - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.
// Reason: be able to determine how many stylesheets there are even without loading
// the template nor the stylesheets, so we can create a stub for TypeScript always synchronously
// (as resouce loading may be async)
// (as resource loading may be async)
const styles = [...preparsedTemplate.styles];
this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);