+…
+i0.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" [class.initial]="isInitial"
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class.ts
new file mode 100644
index 0000000000..4f6d9b85bc
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: '
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class_partial.js
new file mode 100644
index 0000000000..b53f912da4
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class_partial.js
@@ -0,0 +1,7 @@
+.ɵɵelementStart(0, "div") // SOURCE: "/input_binding_class.ts"
'
+…
+.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" [class.initial]="isInitial">
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex.js
new file mode 100644
index 0000000000..a96da43799
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex.js
@@ -0,0 +1,3 @@
+i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_complex.ts"
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex_partial.js
new file mode 100644
index 0000000000..46aec8c098
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex_partial.js
@@ -0,0 +1,4 @@
+.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_complex.ts"
'
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand.js
new file mode 100644
index 0000000000..33e11a5248
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand.js
@@ -0,0 +1,3 @@
+i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_longhand.ts"
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand_partial.js
new file mode 100644
index 0000000000..1da4a0d936
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand_partial.js
@@ -0,0 +1,4 @@
+.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_longhand.ts"
'
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple.js
new file mode 100644
index 0000000000..88fdb74810
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple.js
@@ -0,0 +1,3 @@
+i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_simple.ts"
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple_partial.js
new file mode 100644
index 0000000000..7868ebe5ea
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple_partial.js
@@ -0,0 +1,4 @@
+.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_simple.ts"
'
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.js
new file mode 100644
index 0000000000..d4eec28404
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.js
@@ -0,0 +1,5 @@
+i0.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts"
+…
+i0.ɵɵelementEnd() // SOURCE: "/interpolation_basic.ts"
+…
+i0.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.ts
new file mode 100644
index 0000000000..c14139f2e3
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: '
Hello {{ name }} ',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js
new file mode 100644
index 0000000000..defbe70487
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js
@@ -0,0 +1,6 @@
+.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts"
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵele // SOURCE: "/interpolation_basic.ts" '
+…
+.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js
new file mode 100644
index 0000000000..2d22cbbeae
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js
@@ -0,0 +1,5 @@
+i0.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts"
+…
+i0.ɵɵelementEnd() // SOURCE: "/interpolation_complex.ts"
+…
+i0.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.ts
new file mode 100644
index 0000000000..4753634912
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: '
{{ greeting + " " + name }} ',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js
new file mode 100644
index 0000000000..6b72f59dc3
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js
@@ -0,0 +1,6 @@
+.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts"
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵele // SOURCE: "/interpolation_complex.ts" '
+…
+.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js
new file mode 100644
index 0000000000..3625b88102
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js
@@ -0,0 +1,3 @@
+i0.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts"
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties_partial.js
new file mode 100644
index 0000000000..4ca2d7cce6
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties_partial.js
@@ -0,0 +1,4 @@
+.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts"
'
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js
new file mode 100644
index 0000000000..372d821648
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js
@@ -0,0 +1,5 @@
+i0.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts"
+…
+i0.ɵɵelementEnd() // SOURCE: "/interpolation_with_pipe.ts"
+…
+i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.ts
new file mode 100644
index 0000000000..91dece8e44
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: '
{{200.3 | percent : 2 }}
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js
new file mode 100644
index 0000000000..dc485cfdf2
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js
@@ -0,0 +1,6 @@
+.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts"
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵelem // SOURCE: "/interpolation_with_pipe.ts"
'
+…
+.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js
new file mode 100644
index 0000000000..761a528c34
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js
@@ -0,0 +1,15 @@
+i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_for_simple.ts"
+…
+i0.ɵɵadvance(1) // SOURCE: "/ng_for_simple.ts" {{ item }}
+…
+i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_simple.ts" {{ item }}
+…
+i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts"
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.ts
new file mode 100644
index 0000000000..7f2acd5145
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: '
{{ item }}
'
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js
new file mode 100644
index 0000000000..21ed2ffa86
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js
@@ -0,0 +1,15 @@
+.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_for_simple.ts"
'
+…
+.ɵɵadvance(1);\n // SOURCE: "/ng_for_simple.ts" {{ item }}
+…
+.ɵɵtextInterpolate(item_r1);\n }\n}\n\n // SOURCE: "/ng_for_simple.ts" {{ item }}
+…
+.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts"
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js
new file mode 100644
index 0000000000..2076ca6260
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js
@@ -0,0 +1,4 @@
+i0.ɵɵtext(0) // SOURCE: "/ng_for_templated.ts" {{ item }}
+…
+// TODO - map the bindings better
+i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_templated.ts" {{ item }}
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.ts
new file mode 100644
index 0000000000..83287ff43d
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: `
{{ item }} `
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js
new file mode 100644
index 0000000000..c48b7d422b
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js
@@ -0,0 +1,5 @@
+.ɵɵtext(0);\n }\n\n if (rf & 2) {\n const item_r1 = ctx.$implicit;\n // SOURCE: "/ng_for_templated.ts" {{ item }}`
+…
+// TODO - map the bindings better
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵtextInterpolate(item_r // SOURCE: "/ng_for_templated.ts" {{ item }}`
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js
new file mode 100644
index 0000000000..98c6dd10d6
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js
@@ -0,0 +1,11 @@
+i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_simple.ts"
+…
+i0.ɵɵtextInterpolate(ctx_r0.name) // SOURCE: "/ng_if_simple.ts" {{ name }}
+…
+i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts"
{{ name }}
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple_partial.js
new file mode 100644
index 0000000000..ed39129bf3
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple_partial.js
@@ -0,0 +1,12 @@
+.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_simple.ts"
'
+…
+.ɵɵtextInterpolate(ctx_r0.name);\n }\n}\n\n // SOURCE: "/ng_if_simple.ts" {{ name }}
+…
+.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts"
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js
new file mode 100644
index 0000000000..a10cd5ce18
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js
@@ -0,0 +1,7 @@
+i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_templated.ts"
+…
+// TODO - map the bindings better
+i0.ɵɵelementEnd() // SOURCE: "/ng_if_templated.ts"
+…
+// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
+// TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'});
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.ts
new file mode 100644
index 0000000000..688bc53cbe
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.ts
@@ -0,0 +1,12 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: `
+
+ {{ name }}
+
+ `
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js
new file mode 100644
index 0000000000..c00684bc83
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js
@@ -0,0 +1,8 @@
+.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_templated.ts"
+…
+// TODO - map the bindings better
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵelementEnd();\n // SOURCE: "/ng_if_templated.ts"
\n
+…
+// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
+// TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'});
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js
new file mode 100644
index 0000000000..eb7e90c3bd
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js
@@ -0,0 +1,11 @@
+i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts"
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.ts
new file mode 100644
index 0000000000..4cdfb86138
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: `Add Item `,
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js
new file mode 100644
index 0000000000..850d425921
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js
@@ -0,0 +1,13 @@
+.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts"
+…
+.ɵɵtext(1, "Add Item") // SOURCE: "/output_binding_complex.ts" Add Item
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵelement // SOURCE: "/output_binding_complex.ts" `
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js
new file mode 100644
index 0000000000..5621aac266
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js
@@ -0,0 +1,8 @@
+…
+i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts"
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.ts
new file mode 100644
index 0000000000..e5e3bbc96c
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: 'Do it ',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js
new file mode 100644
index 0000000000..101323ada5
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js
@@ -0,0 +1,9 @@
+…
+.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts"
+…
+.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_longhand.ts" Do it
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵelement // SOURCE: "/output_binding_longhand.ts" '
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js
new file mode 100644
index 0000000000..64bffc962d
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js
@@ -0,0 +1,9 @@
+i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts"
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.ts
new file mode 100644
index 0000000000..877d152d68
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: 'Do it ',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js
new file mode 100644
index 0000000000..d0500d3147
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js
@@ -0,0 +1,10 @@
+.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts"
+…
+.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_simple.ts" Do it
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵelement // SOURCE: "/output_binding_simple.ts" '
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js
new file mode 100644
index 0000000000..cd61a51d1e
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js
@@ -0,0 +1,11 @@
+i0.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts"
+…
+i0.ɵɵprojection(1) // SOURCE: "/projection.ts"
+…
+i0.ɵɵelementEnd() // SOURCE: "/projection.ts"
+…
+i0.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts"
+…
+i0.ɵɵprojection(3, 1) // SOURCE: "/projection.ts"
+…
+i0.ɵɵelementEnd() // SOURCE: "/projection.ts"
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.ts
new file mode 100644
index 0000000000..537dd35c22
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.ts
@@ -0,0 +1,10 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: `
+
+
`
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js
new file mode 100644
index 0000000000..0185dc6017
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js
@@ -0,0 +1,11 @@
+.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts"
+…
+.ɵɵprojection(1) // SOURCE: "/projection.ts"
+…
+.ɵɵelementEnd() // SOURCE: "/projection.ts" \n
+…
+.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts"
+…
+.ɵɵprojection(3, 1) // SOURCE: "/projection.ts"
+…
+.ɵɵelem // SOURCE: "/projection.ts"
`
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js
new file mode 100644
index 0000000000..3e3d11b673
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js
@@ -0,0 +1,5 @@
+i0.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts"
+…
+i0.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1
+…
+i0.ɵɵelementEnd() // SOURCE: "/simple_element.ts"
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.ts
new file mode 100644
index 0000000000..941106dd8c
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: 'Heading 1 ',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js
new file mode 100644
index 0000000000..f17d38c8f1
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js
@@ -0,0 +1,6 @@
+.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts"
+…
+.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵele // SOURCE: "/simple_element.ts" '
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js
new file mode 100644
index 0000000000..bca96455fc
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js
@@ -0,0 +1,6 @@
+i0.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" ',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand_partial.js
new file mode 100644
index 0000000000..7ef18ea874
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand_partial.js
@@ -0,0 +1,7 @@
+.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" '
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵelementEnd() // SOURCE: "/two_way_binding_longhand.ts" ',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_simple_partial.js
new file mode 100644
index 0000000000..601a38fff9
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_simple_partial.js
@@ -0,0 +1,7 @@
+…
+.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_simple.ts" '
+…
+.ɵɵelementEnd() // SOURCE: "/two_way_binding_simple.ts"
+…
+i0.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test
+…
+i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
+…
+i0.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts"
+…
+i0.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
+…
+i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
+…
+// NOTE: Update mode
+i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode.ts
new file mode 100644
index 0000000000..2deac333cb
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: '
this is a test
{{ 1 + 2 }}
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js
new file mode 100644
index 0000000000..27e57418f5
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js
@@ -0,0 +1,16 @@
+// NOTE: Creation mode
+.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts"
+…
+.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test
+…
+.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
+…
+.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts"
+…
+.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
+…
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵelem // SOURCE: "/update_mode.ts"
'
+…
+// NOTE: Update mode
+.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js
new file mode 100644
index 0000000000..92de070684
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js
@@ -0,0 +1 @@
+i0.ɵɵelement(0, "hr") // SOURCE: "/void_element.ts"
\ No newline at end of file
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.ts b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.ts
new file mode 100644
index 0000000000..a82f85b26b
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.ts
@@ -0,0 +1,8 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'test-cmp',
+ template: '
',
+})
+export class TestCmp {
+}
diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js
new file mode 100644
index 0000000000..9b47666e3c
--- /dev/null
+++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js
@@ -0,0 +1,2 @@
+// TODO: Work out how to fix the broken segment for the last item in a template
+.ɵɵel // SOURCE: "/void_element.ts"
'
\ No newline at end of file
diff --git a/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts b/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts
index 017abd8190..6a08157e75 100644
--- a/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts
+++ b/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts
@@ -586,37 +586,6 @@ runInEachFileSystem((os) => {
});
});
- it('should create (simple backtick string) inline template source-mapping', () => {
- const mappings = compileAndMap('
this is a test
{{ 1 + 2 }}
');
-
- // Creation mode
- expectMapping(
- mappings,
- {generated: 'i0.ɵɵelementStart(0, "div")', source: '
', sourceUrl: '../test.ts'});
- expectMapping(mappings, {
- generated: 'i0.ɵɵtext(1, "this is a test")',
- source: 'this is a test',
- sourceUrl: '../test.ts'
- });
- expectMapping(
- mappings, {generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../test.ts'});
- expectMapping(
- mappings,
- {generated: 'i0.ɵɵelementStart(2, "div")', source: '
', sourceUrl: '../test.ts'});
- expectMapping(
- mappings, {generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
- expectMapping(
- mappings, {generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../test.ts'});
-
- // TODO(benlesh): We need to circle back and prevent the extra parens from being generated.
- // Update mode
- expectMapping(mappings, {
- generated: 'i0.ɵɵtextInterpolate(1 + 2)',
- source: '{{ 1 + 2 }}',
- sourceUrl: '../test.ts'
- });
- });
-
it('should create correct inline template source-mapping when the source contains escape sequences',
() => {
// Note that the escaped double quotes, which need un-escaping to be parsed correctly.