feat(ivy): support inline <style> and <link> tags in components (#28997)

Angular supports using <style> and <link> tags inline in component
templates, but previously such tags were not implemented within the ngtsc
compiler. This commit introduces that support.

FW-1069 #resolve

PR Close #28997
This commit is contained in:
Alex Rickabaugh
2019-02-26 14:48:42 -08:00
committed by Ben Lesh
parent 40833ba54b
commit 827e89cfc4
5 changed files with 320 additions and 128 deletions

View File

@ -21,8 +21,6 @@ const IGNORED_EXAMPLES = [
];
const fixmeIvyExamples = [
// fixmeIvy('FW-1069: ngtsc does not support inline <style> and <link>')
'component-styles',
// fixmeIvy('unknown') app fails at runtime due to missing external service (goog is undefined)
'i18n'
];
@ -319,7 +317,10 @@ function getE2eSpecs(basePath, filter) {
// Find all e2e specs in a given example folder.
function getE2eSpecsFor(basePath, specFile, filter) {
// Only get spec file at the example root.
// The formatter doesn't understand nested template string expressions (honestly, neither do I).
// clang-format off
const e2eSpecGlob = `${filter ? `*${filter}*` : '*'}/${specFile}`;
// clang-format on
return globby(e2eSpecGlob, {cwd: basePath, nodir: true})
.then(
paths => paths.filter(file => !IGNORED_EXAMPLES.some(ignored => file.startsWith(ignored)))