Angular Compiler throws Internal error: unknown identifier {}
问题 I am constructing my angular2 services like so import { OpaqueToken, ClassProvider } from "@angular/core"; export interface IService { // ... interface declaration } export class Service implements IService { // ... implementation goes here } export const IService = new OpaqueToken(Service.name); export const ServiceProvider: ClassProvider = { provide: IService, useClass: Service, }; This has worked and compiled wonderfully using ngc with angular 2.x.x But after upgrading to angular 4.x.x,