rangle / angular-ssr

Angular 4+ server-side rendering solution compatible with @angular/material, jQuery, and other libraries that touch the DOM (as well as providing a rich feature set!)
BSD 2-Clause "Simplified" License
279 stars 38 forks source link

Shim errors on Demand Express example #70

Closed mariohmol closed 7 years ago

mariohmol commented 7 years ago

Hi!

Again awesome module!

I had this working in a previous version and cause of this fix https://github.com/rangle/angular-ssr/issues/45 , i had to migrate to new.

Well.. did all changes based on the demand-express example and everything seems to be working pretty good =)

The only thing that i had to do different is add import 'reflect-metadata'; in server index.ts , unless i was getting this error:

@angular/core/bundles/core.umd.js   throw 'reflect-metadata shim is required when using class decorators'

And i checked, i had this in main.ts for frontend.

Should it be added in the example as well?

mariohmol commented 7 years ago

made a PR instead of issue