Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report

Current behavior

I'm submitting a ...

bug report

What modules are related to this Issue?

[X universal

What is the current behavior?

Unable to server-render "code" placed in the template as the parser isn't sure how to handle it.

// adding this to a template causes the error
<code>
constructor () {}
</code>

Error outputed:

zone.js:388 Unhandled Promise rejection: Template parse errors:

Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ("

[ERROR ->]"): App@7:2

Invalid ICU message. Missing '}'. ("

[ERROR ->]"): App@7:2 ; Zone: ; Task: Promise.then ; Value: Error: Template parse errors:(…) Error: Template parse errors:

Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ("

[ERROR ->]"): App@7:2

Invalid ICU message. Missing '}'. ("

[ERROR ->]"): App@7:2

at TemplateParser.parse (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:7728:21)

at RuntimeCompiler._compileTemplate (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:17503:53)

at eval (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:17423:64)

at Set.forEach (native)

at RuntimeCompiler._compileComponents (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:17423:21)

at createResult (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:17319:21)

at ZoneDelegate.invoke (https://unpkg.com/zone.js@0.6.26/dist/zone.js:232:26)

at Zone.run (https://unpkg.com/zone.js@0.6.26/dist/zone.js:114:43)

at https://unpkg.com/zone.js@0.6.26/dist/zone.js:502:57

at ZoneDelegate.invokeTask (https://unpkg.com/zone.js@0.6.26/dist/zone.js:265:35)

Expected behavior

Being able to drop regular code into <pre> | <code> tags, without having to do any special preparation of code so the template parser can handle it.

(I'm not positive if this is possible)

Minimal reproduction of the problem with instructions

Plunkr demo :

http://plnkr.co/edit/MdEDMLEVAmGYeywaKchN?p=preview

Please tell us about your environment:

Any OS

Angular version: 2.0.X

Happens with latest: 2.2.0 as well

Browser: [all]

Language: TypeScript 2.*

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

<div>Test binding: {{2 + 2}}</div>

=> Test binding: 4

<div ngNonBindable>Test non binding: {{2 + 2}}</div>

=> Test binding: {{2 + 2}}

<div>Test non binding: {2 + 2}</div>

=> Template parse errors, the "(Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)" message.

This is a problem because precisely due to the fact that they are [ngNonBindable] marked elements, "{{ '{' }}" doesn't produce the expected result.

Expected behavior

As the escaping of { characters isn't possible inside [ngNonBindable] elements so it's the compiler's job to ignore them altogether, I believe.

<div>Test non binding: {2 + 2}</div>

=> Test binding: {2 + 2}

Reproduction of the problem

here => http://plnkr.co/edit/GSzwEUyXyY1qDabjpEL1?p=preview

Angular version: 2.0.0