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

[x] bug report

Current behavior

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:

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)

Expected/desired behavior

I expected at least a correct compilation with the following root app component:

/*
* 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: `
<nav>
<span>
<a [routerLink]=" ['./'] ">
Index
</a>
</span>
|
<span>
<a [routerLink]=" ['./home'] ">
Home
</a>
</span>
|
<span>
<a [routerLink]=" ['./about'] ">
About
</a>
</span>
</nav>

<main>
<router-outlet></router-outlet>
</main>

<pre class="app-state">this.appState.state = {{ appState.state | json }}</pre>

<footer>
<span>WebPack Angular 2 Starter by <a [href]="url">@AngularClass</a></span>
<div>
<a [href]="url">
<img [src]="angularclassLogo" width="25%">
</a>
</div>
</footer>
`
})
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);
}

}

Reproduction of the problem

This is the project in which i'm trying to make the compiler work, checkout the ng2-stc branch, install and run node_modules/.bin/ngc -p src/app/app.component.ts.

What is the motivation / use case for changing the behavior?

Fix the compilation for the app component to generate the factory and take advantage of the Static Template Compiler feature in Ng2.

Please tell us about your environment:

Angular version: 2.0.0-rc.3

Browser: Not applicable, error in cli (terminal).

Language: TypeScript ^1.9.0-dev.20160627-1.0

Issue 2:
Angular2 Http seems to ignore 'set-cookie' http response headers:

When making a simple call to a service with the angular2 Http module and the server responds with a 'set-cookie' header like this:

set-cookie:ldapid=koen; Domain=.localhost; Expires=Sat, 14-Nov-2015 16:32:06 GMT; Path=/

set-cookie:voucher=b71d3c81-97bb-4833-a3dd-55b3eff07554; Domain=.localhost; Expires=Sat, 14-Nov-2015 16:32:06 GMT; Path=/

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)

... or am I missing something?