platosha / angular-polymer

Angular 2 support for Polymer elements
https://www.npmjs.com/package/angular-polymer
Apache License 2.0
220 stars 44 forks source link

Error encountered resolving symbol values statically #133

Open stephanrauh opened 7 years ago

stephanrauh commented 7 years ago

If I interpret the error message correctly, Angular 2.4 doesn't allow functions in the AppModule. However, my search also revealed similar error messages indicating missing metadata. Be that as it may, adding a Polymer element to the AppModule causes compile errors.

I've added the declaration of a Polymer element to the @NgModule:

@NgModule({
  declarations: [
    AppComponent,
    PolymerElement('app-header-layout'),
  ],
  ... 
}

Running ng serve on @angular/cli version 1.0.0-beta.31 results in this error:

ERROR in Error encountered resolving symbol values statically. Calling function 'PolymerElement', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /Users/stephan/git/angular2kurs/ng2-15b-adding-polymer/src/app/app.module.ts, resolving symbol AppModule in /Users/stephan/git/angular2kurs/ng2-15b-adding-polymer/src/app/app.module.ts

Any ideas how to solve this error? Can I do something about it myself? Is it an incompatibility to Angular 2.4.x or Angular CLI beta 31?

Thanks in advance Stephan

MarkPieszak commented 7 years ago

It's only compatible with CLI 21 and lower, and Angular 2.2 I believe. We are currently looking at upgrading the project for the latest versions.

freytagusu commented 7 years ago

Any progress on this one? Still getting the error using @angular/cli rc1

ghost commented 7 years ago

Any progress on this issue . Even I am getting same error .

These are the versions installed for my app @angular/cli: 1.0.0 node: 6.10.2 os: win32 x64 @angular/common: 4.0.3 @angular/compiler: 4.0.3 @angular/core: 4.0.3 @angular/forms: 4.0.3 @angular/http: 4.0.3 @angular/platform-browser: 4.0.3 @angular/platform-browser-dynamic: 4.0.3 @angular/router: 4.0.3 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.3

Thanks in advance :)

BorntraegerMarc commented 7 years ago

@venky106 we're working on a solution for Angular 2.2+ > 4 at the moment. Should be released soon. If you're​ interested to use angular 4+ with polymer 2+ check this lib out: https://github.com/hotforfeature/origami

ghost commented 7 years ago

I am so glad to see the quick response . I will check it out.