Issue 1:
Hi guys,

I get an infinite loop using beta7, this is the Safari's stacktrace:

Error: Script terminated by timeout at:
DebugDomRenderer</DebugDomRenderer.prototype.createText@http://localhost:2067/node_modules/angular2/bundles/angular2.dev.js:7184:11
viewFactory_t0@viewFactory_t:256:18
viewFactory_t0@viewFactory_t:266:1
viewFactory_t0@viewFactory_t:266:1
viewFactory_t0@viewFactory_t:266:1
viewFactory_t0@viewFactory_t:266:1
viewFactory_t0@viewFactory_t:266:1
...

My packages:

"angular2": "2.0.0-beta.7",
"systemjs": "0.19.20",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15",

My tsd:

{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"jquery/jquery.d.ts": {
"commit": "9027703c0bd831319dcdf7f3169f7a468537f448"
},
"bootstrap/bootstrap.d.ts": {
"commit": "9027703c0bd831319dcdf7f3169f7a468537f448"
}
},
"ambientDependencies": {
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2"
}
}

My boot:

///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>

import {bootstrap} from 'angular2/platform/browser'
import {AppComponent} from './app.component'
import {ROUTER_PROVIDERS} from 'angular2/router';
import {HTTP_PROVIDERS} from 'angular2/http'
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/retry';

bootstrap(AppComponent, [ROUTER_PROVIDERS, HTTP_PROVIDERS]);

My rooting class:

import {Component} from 'angular2/core';
import {RouteConfig, Router, Location, Instruction, ROUTER_DIRECTIVES} from 'angular2/router';
import {MainComponent} from './components/sections/main.component';
import {NotFoundComponent} from './components/sections/not-found.component';
import {EventEmitterService} from './services/event-emitter.service';
import {NavigationService, Routes} from './services/navigation.service';

@Component({
selector: 'my-app',
template: '<router-outlet></router-outlet>',
directives: [ROUTER_DIRECTIVES],
providers: [EventEmitterService, NavigationService]
})
@RouteConfig([
{path:'/' , name: Routes.Main , component: MainComponent, useAsDefault: true},
{path:'/not-found' , name: Routes.NotFound , component: NotFoundComponent}
])
export class AppComponent
{
public constructor(private _router: Router, _location:Location)
{
_router.recognize(_location.path()).then((instruction: Instruction) => {
if (!instruction)
_router.recognize('/not-found').then((instruction: Instruction) => _router.navigateByInstruction(instruction, true));
});
}
}

Using beta6 everything works well.

Issue 2:
RouterLink seems to be broken with on beta.1 (after template_compiler patches) and beta.2. To reproduce minify (with mangle) an app that uses RouterLink then click the link. You will see TypeError: this.directive_2_0.onClick is not a function

or download angular2-webpack-starter and run

npm install && npm run build:prod && npm run server:prod

for template

<header>
<nav>
<h1>Hello {{ name }}</h1>
<ul>
<li router-active>
<a [routerLink]=" ['Index'] ">Index</a>
</li>
<li router-active>
<a [routerLink]=" ['Home'] ">Home</a>
</li>
<li router-active>
<a [routerLink]=" ['About'] ">About</a>
</li>
</ul>
</nav>
</header>

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

<footer>
WebPack Angular 2 Starter by <a [href]="url">@AngularClass</a>
<div>
<img [src]="angularclassLogo" width="10%">
</div>
</footer>

the viewFactory is

(function(exports, styles, resolvedMetadataCache, t, AbstractChangeDetector, ChangeDetectionUtil, ChangeDetectorState, AppProtoView, AppProtoElement, ViewType, AppView, AppElement, flattenNestedViewRenderNodes, checkSlotCount
/**/
) {

var ChangeDetector_e_0 = function ChangeDetector_e_0() {
AbstractChangeDetector.call(
this, "e_0", 16,
ChangeDetector_e_0.gen_propertyBindingTargets, ChangeDetector_e_0.gen_directiveIndices,
5);
this.dehydrateDirectives(false);
}

ChangeDetector_e_0.prototype = Object.create(AbstractChangeDetector.prototype);

ChangeDetector_e_0.prototype.detectChangesInRecordsInternal = function(throwOnChange) {
var l_context = this.context,
l_name0, c_name0, l_interpolate1, l_literal2, c_literal2, l_arrayFn13, l_visibleHref4, l_isRouteActive5, l_literal6, c_literal6, l_arrayFn17, l_visibleHref8, l_isRouteActive9, l_literal10, c_literal10, l_arrayFn111, l_visibleHref12, l_isRouteActive13, l_url14, l_angularclassLogo15;
c_name0 = c_literal2 = c_literal6 = c_literal10 = false;
var isChanged = false;
var changes = null;

this.propertyBindingIndex = 0;

l_name0 = l_context.name;

if (ChangeDetectionUtil.looseNotIdentical(this.name0, l_name0)) {
c_name0 = true

this.name0 = l_name0;
}

if (c_name0) {
l_interpolate1 = "Hello " + ChangeDetectionUtil.s(l_name0) + "";

if (ChangeDetectionUtil.looseNotIdentical(this.interpolate1, l_interpolate1)) {

this.notifyDispatcher(l_interpolate1);

this.interpolate1 = l_interpolate1;
}
}

changes = null;

isChanged = false;

this.propertyBindingIndex = 1;

l_literal2 = "Index";

if (ChangeDetectionUtil.looseNotIdentical(this.literal2, l_literal2)) {
c_literal2 = true

this.literal2 = l_literal2;
}

if (c_literal2) {
l_arrayFn13 = ChangeDetectionUtil.arrayFn1(l_literal2);

if (ChangeDetectionUtil.looseNotIdentical(this.arrayFn13, l_arrayFn13)) {

this.directive_0_0.routeParams = l_arrayFn13;

isChanged = true;

this.arrayFn13 = l_arrayFn13;
}
}

changes = null;

isChanged = false;

this.propertyBindingIndex = 2;

l_visibleHref4 = this.directive_0_0.visibleHref;

if (ChangeDetectionUtil.looseNotIdentical(this.visibleHref4, l_visibleHref4)) {

this.notifyDispatcher(l_visibleHref4);

this.visibleHref4 = l_visibleHref4;
}

this.propertyBindingIndex = 3;

l_isRouteActive5 = this.directive_0_0.isRouteActive;

if (ChangeDetectionUtil.looseNotIdentical(this.isRouteActive5, l_isRouteActive5)) {

this.notifyDispatcher(l_isRouteActive5);

this.isRouteActive5 = l_isRouteActive5;
}

changes = null;

isChanged = false;

this.propertyBindingIndex = 4;

l_literal6 = "Home";

if (ChangeDetectionUtil.looseNotIdentical(this.literal6, l_literal6)) {
c_literal6 = true

this.literal6 = l_literal6;
}

if (c_literal6) {
l_arrayFn17 = ChangeDetectionUtil.arrayFn1(l_literal6);

if (ChangeDetectionUtil.looseNotIdentical(this.arrayFn17, l_arrayFn17)) {

this.directive_1_0.routeParams = l_arrayFn17;

isChanged = true;

this.arrayFn17 = l_arrayFn17;
}
}

changes = null;

isChanged = false;

this.propertyBindingIndex = 5;

l_visibleHref8 = this.directive_1_0.visibleHref;

if (ChangeDetectionUtil.looseNotIdentical(this.visibleHref8, l_visibleHref8)) {

this.notifyDispatcher(l_visibleHref8);

this.visibleHref8 = l_visibleHref8;
}

this.propertyBindingIndex = 6;

l_isRouteActive9 = this.directive_1_0.isRouteActive;

if (ChangeDetectionUtil.looseNotIdentical(this.isRouteActive9, l_isRouteActive9)) {

this.notifyDispatcher(l_isRouteActive9);

this.isRouteActive9 = l_isRouteActive9;
}

changes = null;

isChanged = false;

this.propertyBindingIndex = 7;

l_literal10 = "About";

if (ChangeDetectionUtil.looseNotIdentical(this.literal10, l_literal10)) {
c_literal10 = true

this.literal10 = l_literal10;
}

if (c_literal10) {
l_arrayFn111 = ChangeDetectionUtil.arrayFn1(l_literal10);

if (ChangeDetectionUtil.looseNotIdentical(this.arrayFn111, l_arrayFn111)) {

this.directive_2_0.routeParams = l_arrayFn111;

isChanged = true;

this.arrayFn111 = l_arrayFn111;
}
}

changes = null;

isChanged = false;

this.propertyBindingIndex = 8;

l_visibleHref12 = this.directive_2_0.visibleHref;

if (ChangeDetectionUtil.looseNotIdentical(this.visibleHref12, l_visibleHref12)) {

this.notifyDispatcher(l_visibleHref12);

this.visibleHref12 = l_visibleHref12;
}

this.propertyBindingIndex = 9;

l_isRouteActive13 = this.directive_2_0.isRouteActive;

if (ChangeDetectionUtil.looseNotIdentical(this.isRouteActive13, l_isRouteActive13)) {

this.notifyDispatcher(l_isRouteActive13);

this.isRouteActive13 = l_isRouteActive13;
}

this.propertyBindingIndex = 10;

l_url14 = l_context.url;

if (ChangeDetectionUtil.looseNotIdentical(this.url14, l_url14)) {

this.notifyDispatcher(l_url14);

this.url14 = l_url14;
}

this.propertyBindingIndex = 11;

l_angularclassLogo15 = l_context.angularclassLogo;

if (ChangeDetectionUtil.looseNotIdentical(this.angularclassLogo15, l_angularclassLogo15)) {

this.notifyDispatcher(l_angularclassLogo15);

this.angularclassLogo15 = l_angularclassLogo15;
}

changes = null;

isChanged = false;

}

ChangeDetector_e_0.prototype.handleEventInternal = function(eventName, elIndex, locals) {
var preventDefault = false;
var l_context = this.context,
l_onClick0_0, l_onClick0_1, l_onClick0_2;

if (eventName === "click" && elIndex === 0) {
l_onClick0_0 = this.directive_0_0.onClick();

if (l_onClick0_0 === false) {
preventDefault = true
};
}

if (eventName === "click" && elIndex === 1) {
l_onClick0_1 = this.directive_1_0.onClick();

if (l_onClick0_1 === false) {
preventDefault = true
};
}

if (eventName === "click" && elIndex === 2) {
l_onClick0_2 = this.directive_2_0.onClick();

if (l_onClick0_2 === false) {
preventDefault = true
};
}
return preventDefault;
}

ChangeDetector_e_0.prototype.hydrateDirectives = function(directives) {
this.directive_0_0 = this.getDirectiveFor(directives, 0);
this.directive_1_0 = this.getDirectiveFor(directives, 1);
this.directive_2_0 = this.getDirectiveFor(directives, 2);
this.directive_3_0 = this.getDirectiveFor(directives, 3);

}

ChangeDetector_e_0.prototype.dehydrateDirectives = function(destroyPipes) {
if (destroyPipes) {

}
this.name0 = this.interpolate1 = this.literal2 = this.arrayFn13 = this.visibleHref4 = this.isRouteActive5 = this.literal6 = this.arrayFn17 = this.visibleHref8 = this.isRouteActive9 = this.literal10 = this.arrayFn111 = this.visibleHref12 = this.isRouteActive13 = this.url14 = this.angularclassLogo15 = this.directive_0_0 = this.directive_1_0 = this.directive_2_0 = this.directive_3_0 = ChangeDetectionUtil.uninitialized;
}

ChangeDetector_e_0.gen_propertyBindingTargets = [ChangeDetectionUtil.bindingTarget("textNode", 6, null, null, null), ChangeDetectionUtil.bindingTarget("directive", 0, "routeParams", null, null), ChangeDetectionUtil.bindingTarget("elementAttribute", 0, "href", null, null), ChangeDetectionUtil.bindingTarget("elementClass", 0, "router-link-active", null, null), ChangeDetectionUtil.bindingTarget("directive", 1, "routeParams", null, null), ChangeDetectionUtil.bindingTarget("elementAttribute", 1, "href", null, null), ChangeDetectionUtil.bindingTarget("elementClass", 1, "router-link-active", null, null), ChangeDetectionUtil.bindingTarget("directive", 2, "routeParams", null, null), ChangeDetectionUtil.bindingTarget("elementAttribute", 2, "href", null, null), ChangeDetectionUtil.bindingTarget("elementClass", 2, "router-link-active", null, null), ChangeDetectionUtil.bindingTarget("elementProperty", 4, "href", null, null), ChangeDetectionUtil.bindingTarget("elementProperty", 5, "src", null, null)];

ChangeDetector_e_0.gen_directiveIndices = [ChangeDetectionUtil.directiveIndex(0, 0), ChangeDetectionUtil.directiveIndex(1, 0), ChangeDetectionUtil.directiveIndex(2, 0), ChangeDetectionUtil.directiveIndex(3, 0)];

var appProtoEl0_e = AppProtoElement.create(
resolvedMetadataCache,
0, {}, [t], {}
);
var appProtoEl1_e = AppProtoElement.create(
resolvedMetadataCache,
1, {}, [t], {}
);
var appProtoEl2_e = AppProtoElement.create(
resolvedMetadataCache,
2, {}, [t], {}
);
var appProtoEl3_e = AppProtoElement.create(
resolvedMetadataCache,
3, {}, [t], {}
);
var appProtoEl4_e = AppProtoElement.create(
resolvedMetadataCache,
4, {}, [], {}
);
var appProtoEl5_e = AppProtoElement.create(
resolvedMetadataCache,
5, {
'width': '10%'
}, [], {}
);
var appProtoView6_e0 = AppProtoView.create(resolvedMetadataCache, 1, [], {});
var renderType53_e = null;
var styles54_e = styles;

function viewFactory_e0(parentRenderer, viewManager, containerEl, projectableNodes, rootSelector, dynamicallyCreatedProviders, rootInjector) {
if (renderType53_e == null) {
renderType53_e = viewManager.createRenderComponentType(0, styles54_e);
}
var renderer = parentRenderer.renderComponent(renderType53_e);
var view = new AppView(
appProtoView6_e0, renderer, viewManager,
projectableNodes,
containerEl,
dynamicallyCreatedProviders, rootInjector,
function() {
return new ChangeDetector_e_0();
}()
);
checkSlotCount('e', 0, projectableNodes);
var parentRenderNode = renderer.createViewRoot(view.containerAppElement.nativeElement);
var render0_e = renderer.createText(parentRenderNode, '\n ');
var render1_e = renderer.createElement(parentRenderNode, 'header');
var render2_e = renderer.createText(render1_e, '\n ');
var render3_e = renderer.createElement(render1_e, 'nav');
var render4_e = renderer.createText(render3_e, '\n ');
var render5_e = renderer.createElement(render3_e, 'h1');
var render6_e = renderer.createText(render5_e, '');
var render7_e = renderer.createText(render3_e, '\n ');
var render8_e = renderer.createElement(render3_e, 'ul');
var render9_e = renderer.createText(render8_e, '\n ');
var render10_e = renderer.createElement(render8_e, 'li');
renderer.setElementAttribute(render10_e, 'router-active', '');
var render11_e = renderer.createText(render10_e, '\n ');
var render12_e = renderer.createElement(render10_e, 'a');
renderer.listen(render12_e, 'click', function(event) {
return view.triggerEventHandlers('click', event, 0);
});
var render14_e = renderer.createText(render12_e, 'Index');
var render15_e = renderer.createText(render10_e, '\n ');
var render16_e = renderer.createText(render8_e, '\n ');
var render17_e = renderer.createElement(render8_e, 'li');
renderer.setElementAttribute(render17_e, 'router-active', '');
var render18_e = renderer.createText(render17_e, '\n ');
var render19_e = renderer.createElement(render17_e, 'a');
renderer.listen(render19_e, 'click', function(event) {
return view.triggerEventHandlers('click', event, 1);
});
var render21_e = renderer.createText(render19_e, 'Home');
var render22_e = renderer.createText(render17_e, '\n ');
var render23_e = renderer.createText(render8_e, '\n ');
var render24_e = renderer.createElement(render8_e, 'li');
renderer.setElementAttribute(render24_e, 'router-active', '');
var render25_e = renderer.createText(render24_e, '\n ');
var render26_e = renderer.createElement(render24_e, 'a');
renderer.listen(render26_e, 'click', function(event) {
return view.triggerEventHandlers('click', event, 2);
});
var render28_e = renderer.createText(render26_e, 'About');
var render29_e = renderer.createText(render24_e, '\n ');
var render30_e = renderer.createText(render8_e, '\n ');
var render31_e = renderer.createText(render3_e, '\n ');
var render32_e = renderer.createText(render1_e, '\n ');
var render33_e = renderer.createText(parentRenderNode, '\n\n ');
var render34_e = renderer.createElement(parentRenderNode, 'main');
var render35_e = renderer.createText(render34_e, '\n ');
var render36_e = renderer.createElement(render34_e, 'router-outlet');
var render38_e = renderer.createText(render34_e, '\n ');
var render39_e = renderer.createText(parentRenderNode, '\n\n ');
var render40_e = renderer.createElement(parentRenderNode, 'footer');
var render41_e = renderer.createText(render40_e, '\n WebPack Angular 2 Starter by ');
var render42_e = renderer.createElement(render40_e, 'a');
var render44_e = renderer.createText(render42_e, '@AngularClass');
var render45_e = renderer.createText(render40_e, '\n ');
var render46_e = renderer.createElement(render40_e, 'div');
var render47_e = renderer.createText(render46_e, '\n ');
var render48_e = renderer.createElement(render46_e, 'img');
renderer.setElementAttribute(render48_e, 'width', '10%');
var render50_e = renderer.createText(render46_e, '\n ');
var render51_e = renderer.createText(render40_e, '\n ');
var render52_e = renderer.createText(parentRenderNode, '\n ');
var app13_e = new AppElement(appProtoEl0_e, view,
null, render12_e, null);
var app20_e = new AppElement(appProtoEl1_e, view,
null, render19_e, null);
var app27_e = new AppElement(appProtoEl2_e, view,
null, render26_e, null);
var app37_e = new AppElement(appProtoEl3_e, view,
null, render36_e, null);
var app43_e = new AppElement(appProtoEl4_e, view,
null, render42_e, null);
var app49_e = new AppElement(appProtoEl5_e, view,
null, render48_e, null);

view.init(([]), [render0_e, render1_e, render2_e, render3_e, render4_e, render5_e, render6_e, render7_e, render8_e, render9_e, render10_e, render11_e, render12_e, render14_e, render15_e, render16_e, render17_e, render18_e, render19_e, render21_e, render22_e, render23_e, render24_e, render25_e, render26_e, render28_e, render29_e, render30_e, render31_e, render32_e, render33_e, render34_e, render35_e, render36_e, render38_e, render39_e, render40_e, render41_e, render42_e, render44_e, render45_e, render46_e, render47_e, render48_e, render50_e, render51_e, render52_e], [], [app13_e, app20_e, app27_e, app37_e, app43_e, app49_e]);
return view;
}
return viewFactory_e0
})

2016-01-24 23:42:12.787
browser_adapter.ts:73 TypeError: this.directive_2_0.onClick is not a function
at t.ChangeDetector_e_0.handleEventInternal (viewFactory_e:358)
at t.handleEvent (abstract_change_detector.ts:80)
at t.triggerEventHandlers (view.ts:269)
at eval (viewFactory_e:480)
at dom_renderer.ts:286
at dom_events.ts:15
at n.t [as run] (polyfills.e18fe4046a301a646e5d.bundle.js:5857)
at n.run (ng_zone.ts:370)
at t.run (ng_zone.ts:317)
at HTMLAnchorElement.i (dom_events.ts:15)