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

Is this compatible with angular 4.0.0? #146

Closed bmodeprogrammer closed 7 years ago

bmodeprogrammer commented 7 years ago

To test it, I only generated a project with angular-cli:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { PolymerElement } from '@vaadin/angular2-polymer';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent,
    PolymerElement('paper-input')
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule
  ],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule { }

And give me this error:

Uncaught TypeError: Cannot read property 'BrowserDomAdapter' of undefined at Object.module.exports (polymer-element.js:23) at webpack_require (bootstrap aba9557…:52) at Object. (index.js:2) at webpack_require (bootstrap aba9557…:52) at Object.113 (app.component.ts:9) at webpack_require (bootstrap aba9557…:52) at Object.105 (src async:7) at webpack_require (bootstrap aba9557…:52) at Object.246 (main.bundle.js:165) at __webpack_require__ (bootstrap aba9557…:52) at webpackJsonpCallback (bootstrap aba9557…:23) at main.bundle.js:1

And all the imports on Index, including webcomponents.js and the elements.

rstpv commented 7 years ago

No, the interoperability has been gone since Angular 2.2.0: https://github.com/platosha/angular-polymer/issues/104 They are actually working on making it compatible with 2.2.0, not sure if it will be compatible with angular 4 but as far as I saw in the angular changelog, RootRenderer was deprecated (RendererFactory2) so, it will probably need some changes to work with Angular 4.

bmodeprogrammer commented 7 years ago

thank you, so I will close the issue.