Issue 1:
TypeScript Version:

1.7.5

Code

import {HTTP_PROVIDERS} from 'angular2/http'; // <-- one quotes !
import {Component} from "angular2/core";
import {Http} from "angular2/http"; // <-- two quotes !

@Component({
templateUrl: 'tst.html',
viewProviders: [HTTP_PROVIDERS]
})

export class tst {
constructor(private http1:Http) {
http1.get('tst');
}
}

Expected behavior:

After compilation (js file):

System.register(['angular2/http', "angular2/core"] ...

Actual behavior:

After compilation (js file):

System.register(['angular2/http', "angular2/core", "angular2/http"] ...

I have a many problems with this bug

bug example (with demo): http://stackoverflow.com/q/36134033/2051938

Issue 2:
Using Angular2-beta0

So I have this TS file

import { Component, View } from 'angular2/core';
import { Router } from 'angular2/router';
import {AuthCanActivate} from "../../common/auth/auth.canactivate";
import {ComponentInstruction} from "angular2/router";
import {CanActivate} from "angular2/router";
import {Http} from "angular2/http";
import {API_URL} from "../../common/core/constants";
import {Inject} from "angular2/core";
import {Response} from "angular2/http";
import {Observable} from "rxjs/Observable";

@Component({
selector: 'dashboard',
})

@CanActivate((to: ComponentInstruction, from: ComponentInstruction) => {
return true;
})

@View({
templateUrl: './features/dashboard/dashboard.component.html',
styleUrls: ['./features/dashboard/dashboard.component.css' ]
})

export class DashboardComponent
{
constructor(public router: Router, @Inject(API_URL) public apiUrl: string)
{
}
}

which transpile to

(function(System) {System.register(['angular2/core', 'angular2/router', "angular2/router", "../../common/core/constants", "angular2/core"], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var core_1, router_1, router_2, constants_1, core_2;
var DashboardComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (router_1_1) {
router_1 = router_1_1;
},
function (router_2_1) {
router_2 = router_2_1;
},
function (constants_1_1) {
constants_1 = constants_1_1;
},
function (core_2_1) {
core_2 = core_2_1;
}],
execute: function() {
DashboardComponent = (function () {
function DashboardComponent(router, apiUrl) {
this.router = router;
this.apiUrl = apiUrl;
}
DashboardComponent = __decorate([
core_1.Component({
selector: 'dashboard',
}),
router_2.CanActivate(function (to, from) {
return true;
}),
core_1.View({
templateUrl: './features/dashboard/dashboard.component.html',
styleUrls: ['./features/dashboard/dashboard.component.css']
}),
__param(1, core_2.Inject(constants_1.API_URL)),
__metadata('design:paramtypes', [router_1.Router, String])
], DashboardComponent);
return DashboardComponent;
})();
exports_1("DashboardComponent", DashboardComponent);
}
}
});

})(System);

giving me an error router_2.CanActivate is not a function. Debugging and checking router_2, I actually have the API_URL token... O_o which is an OpaqueToken

whereas if I have this TS file

import { Component, Inject, View } from 'angular2/core';
import { CanActivate, ComponentInstruction, Router } from 'angular2/router';
import {AuthCanActivate} from "../../common/auth/auth.canactivate";
import {Http, Response} from "angular2/http";
import {API_URL} from "../../common/core/constants";
import {Observable} from "rxjs/Observable";

@Component({
selector: 'dashboard',
})

@CanActivate((to: ComponentInstruction, from: ComponentInstruction) => {
return true;
})

@View({
templateUrl: './features/dashboard/dashboard.component.html',
styleUrls: ['./features/dashboard/dashboard.component.css' ]
})

export class DashboardComponent
{
constructor(public router: Router, @Inject(API_URL) public apiUrl: string)
{
}
}

it transpile to

(function(System) {
System.register(['angular2/core', 'angular2/router', "../../common/core/constants"], function(exports_1) {
var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if (d = decorators[i])
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r),
r;
}
;
var __metadata = (this && this.__metadata) || function(k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
return Reflect.metadata(k, v);
}
;
var __param = (this && this.__param) || function(paramIndex, decorator) {
return function(target, key) {
decorator(target, key, paramIndex);
}
}
;
var core_1, router_1, constants_1;
var DashboardComponent;
return {
setters: [
function(core_1_1) {
core_1 = core_1_1;
}
,
function(router_1_1) {
router_1 = router_1_1;
}
,
function(constants_1_1) {
constants_1 = constants_1_1;
}
],
execute: function() {
DashboardComponent = (function() {
function DashboardComponent(router, apiUrl) {
this.router = router;
this.apiUrl = apiUrl;
}
DashboardComponent = __decorate([
core_1.Component({
selector: 'dashboard',
}),
router_1.CanActivate(function(to, from) {
return true;
}),
core_1.View({
templateUrl: './features/dashboard/dashboard.component.html',
styleUrls: ['./features/dashboard/dashboard.component.css']
}),
__param(1, core_1.Inject(constants_1.API_URL)),
__metadata('design:paramtypes', [router_1.Router, String])
], DashboardComponent);
return DashboardComponent;
})();
exports_1("DashboardComponent", DashboardComponent);
}
}
});

})(System);

which is fine.

The difference here is really in the imports.

Have I missed something?