<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Before 2.1.1, building our code with ngc would compile it with no errors (but not actually AoT the Angular templates because we use the upgrade adapter). Now that upgrade adapter AoT support has been added with 2.1.1, I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /home/gibson/.build/shared/js/cyph.im/appmodule.ts, resolving symbol AppModule in /home/gibson/.build/shared/js/cyph.im/appmodule.ts
    at simplifyInContext (/usr/lib/node_modules/@angular/compiler-cli/src/static_reflector.js:472:23)
    at StaticReflector.simplify (/usr/lib/node_modules/@angular/compiler-cli/src/static_reflector.js:475:22)
    at StaticReflector.annotations (/usr/lib/node_modules/@angular/compiler-cli/src/static_reflector.js:61:36)
    at _loop_1 (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:66:54)
    at CodeGeneratorModuleCollector.readFileMetadata (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:79:13)
    at /usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:41:74
    at Array.map (native)
    at CodeGeneratorModuleCollector.getModuleSymbols (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:41:35)
    at CodeGenerator.codegen (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:120:39)
    at codegen (/usr/lib/node_modules/@angular/compiler-cli/src/main.js:7:81)"><pre class="notranslate"><code class="notranslate">Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /home/gibson/.build/shared/js/cyph.im/appmodule.ts, resolving symbol AppModule in /home/gibson/.build/shared/js/cyph.im/appmodule.ts
    at simplifyInContext (/usr/lib/node_modules/@angular/compiler-cli/src/static_reflector.js:472:23)
    at StaticReflector.simplify (/usr/lib/node_modules/@angular/compiler-cli/src/static_reflector.js:475:22)
    at StaticReflector.annotations (/usr/lib/node_modules/@angular/compiler-cli/src/static_reflector.js:61:36)
    at _loop_1 (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:66:54)
    at CodeGeneratorModuleCollector.readFileMetadata (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:79:13)
    at /usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:41:74
    at Array.map (native)
    at CodeGeneratorModuleCollector.getModuleSymbols (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:41:35)
    at CodeGenerator.codegen (/usr/lib/node_modules/@angular/compiler-cli/src/codegen.js:120:39)
    at codegen (/usr/lib/node_modules/@angular/compiler-cli/src/main.js:7:81)
</code></pre></div>
<p dir="auto"><strong>Expected behavior</strong><br>
Code builds successfully.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
Running ngc on our project that includes the following main module:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import {AppComponent} from './appcomponent';
import {CommonModule} from '@angular/common';
import {NgModule, forwardRef} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {UpgradeAdapter as NgUpgradeAdapter} from '@angular/upgrade';
...


export const UpgradeAdapter = new NgUpgradeAdapter(
    forwardRef(() =&gt; AppModule)
);


@NgModule({
    imports: [
        BrowserModule,
        CommonModule
    ],
    declarations: [
        AppComponent,
        UpgradeAdapter.upgradeNg1Component(
            ...
        ),
        ...
    ]
})
export class AppModule {}"><pre class="notranslate"><code class="notranslate">import {AppComponent} from './appcomponent';
import {CommonModule} from '@angular/common';
import {NgModule, forwardRef} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {UpgradeAdapter as NgUpgradeAdapter} from '@angular/upgrade';
...


export const UpgradeAdapter = new NgUpgradeAdapter(
    forwardRef(() =&gt; AppModule)
);


@NgModule({
    imports: [
        BrowserModule,
        CommonModule
    ],
    declarations: [
        AppComponent,
        UpgradeAdapter.upgradeNg1Component(
            ...
        ),
        ...
    ]
})
export class AppModule {}
</code></pre></div>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Being able to use Angular 2 at all. (We can't use JIT'd ng2 in prod due to our CSP.)</p>
<p dir="auto"><strong>Please tell us about your environment:</strong> Debian Jessie inside Docker on OS X El Capitan</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.1.1</li>
<li><strong>Browser:</strong> N/A</li>
<li><strong>Language:</strong> TypeScript 2.0.3</li>
<li><strong>Node (for AoT issues):</strong> 6.7.0</li>
</ul>
<p dir="auto">I have been struggling with issues using the paper-data-table written in polymer<br>
(more information about the issue and my questetion is here: [http://stackoverflow.com/questions/36864501/using-paper-datatable-in-angular2](The issue)<br>
One of the suggested solution is to surround the table with: <br>
which is a polymer binding helper element. The problem is that angular removes all the template tags from the dom which dont use an angular directive (inside my component html).<br>
I didn't find a way to coop with this, maybe there should be some way of telling angular to not process the some template tags (but still process their children because I do need to use data biniding inside the template tag in order to pass data for the table element)</p>