<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"><pre class="notranslate"><code class="notranslate">[x] bug report
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
I have a file in which i try to run the compiler and it gives me the following error, but only with that one, with any other component it works as expected:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'getSymbolsInScope' of undefined
    at MetadataCollector.getMetadata (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/tsc-wrapped/src/collector.js:149:34)
    at ReflectorHost.getMetadataFor (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/reflector_host.js:156:47)
    at StaticReflector.getModuleMetadata (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/static_reflector.js:424:40)
    at CodeGenerator.readComponents (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/codegen.js:44:51)
    at generateOneFile (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/codegen.js:100:38)
    at Array.map (native)
    at CodeGenerator.codegen (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/codegen.js:127:14)"><pre class="notranslate">TypeError: Cannot <span class="pl-c1">read</span> property <span class="pl-s"><span class="pl-pds">'</span>getSymbolsInScope<span class="pl-pds">'</span></span> of undefined
    at MetadataCollector.getMetadata (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/tsc-wrapped/src/collector.js:149:34)
    at ReflectorHost.getMetadataFor (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/reflector_host.js:156:47)
    at StaticReflector.getModuleMetadata (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/static_reflector.js:424:40)
    at CodeGenerator.readComponents (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/codegen.js:44:51)
    at generateOneFile (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/codegen.js:100:38)
    at Array.map (native)
    at CodeGenerator.codegen (/Users/aplicaciones2/Documents/Ng2WebpackProStarter/node_modules/@angular/compiler-cli/src/codegen.js:127:14)</pre></div>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
I expected at least a correct compilation with the following root app component:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/*
 * Angular 2 decorators and services
 */
import { Component, ViewEncapsulation } from '@angular/core';

import { AppState } from './app.service';

/*
 * App Component
 * Top Level Component
 */
@Component({
  selector: 'app',
  encapsulation: ViewEncapsulation.None,
  styleUrls: [
    './app.style.scss'
  ],
  template: `
    &lt;nav&gt;
      &lt;span&gt;
        &lt;a [routerLink]=&quot; ['./'] &quot;&gt;
          Index
        &lt;/a&gt;
      &lt;/span&gt;
      |
      &lt;span&gt;
        &lt;a [routerLink]=&quot; ['./home'] &quot;&gt;
          Home
        &lt;/a&gt;
      &lt;/span&gt;
      |
      &lt;span&gt;
        &lt;a [routerLink]=&quot; ['./about'] &quot;&gt;
          About
        &lt;/a&gt;
      &lt;/span&gt;
    &lt;/nav&gt;

    &lt;main&gt;
      &lt;router-outlet&gt;&lt;/router-outlet&gt;
    &lt;/main&gt;

    &lt;pre class=&quot;app-state&quot;&gt;this.appState.state = {{ appState.state | json }}&lt;/pre&gt;

    &lt;footer&gt;
      &lt;span&gt;WebPack Angular 2 Starter by &lt;a [href]=&quot;url&quot;&gt;@AngularClass&lt;/a&gt;&lt;/span&gt;
      &lt;div&gt;
        &lt;a [href]=&quot;url&quot;&gt;
          &lt;img [src]=&quot;angularclassLogo&quot; width=&quot;25%&quot;&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/footer&gt;
  `
})
export class App {
  angularclassLogo = 'assets/img/angularclass-avatar.png';
  name = 'Angular 2 Webpack Starter';
  url = 'https://twitter.com/AngularClass';

  constructor(
    public appState: AppState
  ) {}

  ngOnInit() {
    console.log('Initial App State', this.appState.state);
  }

}
"><pre class="notranslate"><span class="pl-c">/*</span>
<span class="pl-c"> * Angular 2 decorators and services</span>
<span class="pl-c"> */</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">Component</span><span class="pl-kos">,</span> <span class="pl-v">ViewEncapsulation</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/core'</span><span class="pl-kos">;</span>

<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">AppState</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./app.service'</span><span class="pl-kos">;</span>

<span class="pl-c">/*</span>
<span class="pl-c"> * App Component</span>
<span class="pl-c"> * Top Level Component</span>
<span class="pl-c"> */</span>
@<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c1">selector</span>: <span class="pl-s">'app'</span><span class="pl-kos">,</span>
  <span class="pl-c1">encapsulation</span>: <span class="pl-v">ViewEncapsulation</span><span class="pl-kos">.</span><span class="pl-c1">None</span><span class="pl-kos">,</span>
  <span class="pl-c1">styleUrls</span>: <span class="pl-kos">[</span>
    <span class="pl-s">'./app.style.scss'</span>
  <span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-c1">template</span>: <span class="pl-s">`</span>
<span class="pl-s">    &lt;nav&gt;</span>
<span class="pl-s">      &lt;span&gt;</span>
<span class="pl-s">        &lt;a [routerLink]=" ['./'] "&gt;</span>
<span class="pl-s">          Index</span>
<span class="pl-s">        &lt;/a&gt;</span>
<span class="pl-s">      &lt;/span&gt;</span>
<span class="pl-s">      |</span>
<span class="pl-s">      &lt;span&gt;</span>
<span class="pl-s">        &lt;a [routerLink]=" ['./home'] "&gt;</span>
<span class="pl-s">          Home</span>
<span class="pl-s">        &lt;/a&gt;</span>
<span class="pl-s">      &lt;/span&gt;</span>
<span class="pl-s">      |</span>
<span class="pl-s">      &lt;span&gt;</span>
<span class="pl-s">        &lt;a [routerLink]=" ['./about'] "&gt;</span>
<span class="pl-s">          About</span>
<span class="pl-s">        &lt;/a&gt;</span>
<span class="pl-s">      &lt;/span&gt;</span>
<span class="pl-s">    &lt;/nav&gt;</span>
<span class="pl-s"></span>
<span class="pl-s">    &lt;main&gt;</span>
<span class="pl-s">      &lt;router-outlet&gt;&lt;/router-outlet&gt;</span>
<span class="pl-s">    &lt;/main&gt;</span>
<span class="pl-s"></span>
<span class="pl-s">    &lt;pre class="app-state"&gt;this.appState.state = {{ appState.state | json }}&lt;/pre&gt;</span>
<span class="pl-s"></span>
<span class="pl-s">    &lt;footer&gt;</span>
<span class="pl-s">      &lt;span&gt;WebPack Angular 2 Starter by &lt;a [href]="url"&gt;@AngularClass&lt;/a&gt;&lt;/span&gt;</span>
<span class="pl-s">      &lt;div&gt;</span>
<span class="pl-s">        &lt;a [href]="url"&gt;</span>
<span class="pl-s">          &lt;img [src]="angularclassLogo" width="25%"&gt;</span>
<span class="pl-s">        &lt;/a&gt;</span>
<span class="pl-s">      &lt;/div&gt;</span>
<span class="pl-s">    &lt;/footer&gt;</span>
<span class="pl-s">  `</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">App</span> <span class="pl-kos">{</span>
  <span class="pl-c1">angularclassLogo</span> <span class="pl-c1">=</span> <span class="pl-s">'assets/img/angularclass-avatar.png'</span><span class="pl-kos">;</span>
  <span class="pl-c1">name</span> <span class="pl-c1">=</span> <span class="pl-s">'Angular 2 Webpack Starter'</span><span class="pl-kos">;</span>
  <span class="pl-c1">url</span> <span class="pl-c1">=</span> <span class="pl-s">'https://twitter.com/AngularClass'</span><span class="pl-kos">;</span>

  <span class="pl-en">constructor</span><span class="pl-kos">(</span>
    <span class="pl-s1">public</span> <span class="pl-s1">appState</span>: <span class="pl-v">AppState</span>
  <span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>

  <span class="pl-en">ngOnInit</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'Initial App State'</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">appState</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>

<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
This is the project in which i'm trying to make the compiler work, checkout the <code class="notranslate">ng2-stc</code> branch, install and run <code class="notranslate">node_modules/.bin/ngc -p src/app/app.component.ts</code>.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Fix the compilation for the app component to generate the factory and take advantage of the <code class="notranslate">Static Template Compiler</code> feature in Ng2.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.3</li>
<li><strong>Browser:</strong> Not applicable, error in cli (terminal).</li>
<li><strong>Language:</strong> TypeScript ^1.9.0-dev.20160627-1.0</li>
</ul>
<p dir="auto">Angular2 Http seems to ignore 'set-cookie' http response headers:<br>
When making a simple call to a service with the angular2 Http module and the server responds with a 'set-cookie' header like this:</p>
<p dir="auto">set-cookie:ldapid=koen; Domain=.localhost; Expires=Sat, 14-Nov-2015 16:32:06 GMT; Path=/<br>
set-cookie:voucher=b71d3c81-97bb-4833-a3dd-55b3eff07554; Domain=.localhost; Expires=Sat, 14-Nov-2015 16:32:06 GMT; Path=/</p>
<p dir="auto">Any subsequent calls to the service (same host / same path) seem to ignore the fact that the server has set these cookies for that domain because the relevant cookies do not show up on the headers of the outgoing http requests. (according to http trace seen in browser and on the network)</p>
<p dir="auto">... or am I missing something?</p>