Epotignano / ng2-social-share

Angular2 social share module, share urls and content on social networks such as facebook, google+, twitter, pinterest and so on -
20 stars 24 forks source link

AoT Ng Universal build #11

Open bencameron00 opened 7 years ago

bencameron00 commented 7 years ago

When I am trying to do an AoT build using the Angular Universal starter pack I am seeing this error...

ERROR in Unexpected value 'CeiboShare in C:/XXX/node_modules/ng2-social-share/src/ng2-social-share.d.ts' declared by the module 'AppModule in C:/XXX/Client/app/app.module.ts'. Please add a @Pipe/@Directive/@Component annotation.

Are there any plans to make this compatible with AoT and Ng Universal?

The starter pack that I am using is... https://github.com/MarkPieszak/aspnetcore-angular2-universal

All other ng2-social-share setup instructions have been followed.

Note that the share component works when not doing an AoT build/run however AoT is needed when publishing a production instance.

Thank you

patroclo404 commented 7 years ago

Do you fix this????

Epotignano commented 7 years ago

Hi! I need to maintain this better, I'm accepting pull requests for this. I'm so busy launching a new product to the market, sorry.

bergergit commented 6 years ago

This one, with similar concept, works: https://github.com/MurhafSousli/ngx-sharebuttons

It might help to see how the developer did it: using ShareButtonsModule.forRoot() in main module, and just ShareButtonsModule in lazy loaded modules.

jcerar commented 6 years ago

https://medium.com/@isaacplmann/getting-your-angular-2-library-ready-for-aot-90d1347bcad