Angular2 + Jspm.io : reflect-metadata shim is required when using class decorators Angular2 + Jspm.io : reflect-metadata shim is required when using class decorators angular angular

Angular2 + Jspm.io : reflect-metadata shim is required when using class decorators


Yes, what you're looking for is possible and works nicely. It appears as though you have the dependencies right. I think you are missing only the following, which needs to be at the beginning of your top level typescript or JavaScript file. Specifically, these need to be prior to the first line is that loads Angular.

import 'zone.js';import 'reflect-metadata';

(The other answer points to a detailed, but off-site explanation.)


Robwormald wrote a nicely detailed explanation that covers the issues people might have at this point and time trying to get angular alpha 27 to work with jspm and typescript https://gist.github.com/robwormald/429e01c6d802767441ec


If this problem occurs in an Angular 4.4+ environment, it can help if you restart ng serve.