angular2-grid icon indicating copy to clipboard operation
angular2-grid copied to clipboard

Angular 2 Release (SystemJS) Can't resolve all parameters for ElementRef: (?)

Open blubberbo opened this issue 9 years ago • 2 comments

I upgrades from Angular 2 RC 4 to the Final Release and I am not getting (SystemJS) Can't resolve all parameters for ElementRef: (?) and I have removed all over references to ElementRef from my project.

Any ideas on how to import it correctly into the angular2-grid code? Currently I am importing it as a provider in my NgModule tag and it is throwing this error. If I take it out of my app.module.ts, it says no provider for ElementRef.

thank you in advance

blubberbo avatar Oct 02 '16 09:10 blubberbo

ElementRef is a core part of Angular 2 so why it doesn't get imported points to something wrong with your app setup. Are you including BrowserModule as well as NgGridModule in your app's NgModule?

BTMorton avatar Nov 20 '16 02:11 BTMorton

You need emitDecoratorMetadata set to true in your tcConfig or Visual Studio project file

tsConfig emilDecoratorMetadata: true

Visual Studio

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <TypeScriptRemoveComments>false</TypeScriptRemoveComments>
    <TypeScriptSourceMap>true</TypeScriptSourceMap>
    <TypeScriptTarget>ES5</TypeScriptTarget>
    <TypeScriptJSXEmit>None</TypeScriptJSXEmit>
    <TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
    <TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
    <TypeScriptModuleKind>System</TypeScriptModuleKind>
    <TypeScriptModuleResolution>node</TypeScriptModuleResolution>
    <TypeScriptOutFile />
    <TypeScriptOutDir />
    <TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
    <TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
    <TypeScriptMapRoot />
    <TypeScriptSourceRoot />
    <TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators>
    <TypeScriptEmitDecoratorMetadata>True</TypeScriptEmitDecoratorMetadata>
  </PropertyGroup>

jimlimper avatar Dec 08 '16 21:12 jimlimper