import { Component, provide } from '@angular/core';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {LocationStrategy, HashLocationStrategy, Location} from '@angular/common';
import {
	Routes,
	Route,
	ROUTER_PROVIDERS,
	ROUTER_DIRECTIVES
} from '@angular/router';
    
// Video Component
@Component({ 
    selector: 'my-video',
    template: `
            <h1>I LOVE THIS VIDEO!</h1>
        `,

    styles: [`h1{background:#0f0;}`]
})
class Video { }
        
//Music Component
@Component({ 
    selector: 'my-music',
    template: `
            <h1>THAT'S FANTASTIC MUSIC!, RoutParams: {{id}}</h1>
        `,
    styles: [`h1{background:#f00;}`]
})
class Music {
	routerOnActivate(curr, prev, currTree, prevTree) {
		this.id =  curr.getParam('id');
	}
 }
    
@Component({ 
    selector: 'my-router',
	directives: [ROUTER_DIRECTIVES],
    template : `
        <nav>
            <a [routerLink]="['/video']">video</a> | 
            <a [routerLink]="['/music','idParams']">music</a>
        </nav>
        <main>
            <router-outlet></router-outlet>
        </main>
    `

})
@Routes([
    new Route({path: '/video', component: Video, useAsDefault: true }),
    new Route({path:'/music/:id', component:Music })
])
class App{}

bootstrap(App, [
    ROUTER_PROVIDERS,
    provide(LocationStrategy, { useClass: HashLocationStrategy })
]);
@@ -1159,28 +1159,8 @@
 ideo
-, useAsDefault: true
  %7D),
@@ -1226,16 +1226,91 @@
 ass App%7B
+%0A    constructor(location:Location) %7B%0A        location.go('/video');%0A    %7D%0A
 %7D%0A%0Aboots

update to angular2 rc.1