-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
angular-cli does build project when using Reflect.getMetadata #1495
Comments
Same problem here... |
To get around this I had to declare in my TS file a Reflect. then compilation passed ok. I jsut put this into my common file: declare abstract class Reflect { |
Is this declaration in the same file as your component? How about runtime behavior? |
I have it now temporary inside environemt.ts. Regarding the runtime behavior all this declaration are properly hooked with correct implementation as you bring in reflection-meta |
Very nice, I'm gonna try later and report my own experience on it. I'm coming from Java/JSF technology and my goal now is to understand how Angular2/TS works and how can I implement some nice things I found in JSF such as composite, reusable components and so forth. |
This is what I'm trying: https://medium.com/@ttemplier/angular2-decorators-and-class-inheritance-905921dbd1b7#.c5pgjkdxj |
Tried here... Added code snippet in environment.ts. angular-cli is able to compile but:
** Update ** But when I open browser a 404 for reflect-metadata is thrown ** Update ** Now it worked, |
Did my test and realized that properties is not being merged. =( It seems Reflect is not bound to declaration during runtime. Any ideas? |
I think this is fixed in the webpack branch, since we changed the build process. I believe the problem before was that reflect was being loaded via a shim in index.html, and you were not importing it. |
So what is the "proper" way of using |
I was helped by the installation package for babel: |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Mac Osx
ng --version
. If there's nothing outputted, please runin a Terminal:
node --version
and paste the result here:angular-cli: 1.0.0-beta.10
node: 6.0.0
os: darwin x64
do on your code? etc.
I created simple decorator in my component class
When I try to compile this using angular cli
ng build --dev
I get following error :
When I try to compile the TS file just using tsc, it work fine.
am I missing something in terms of configuring angular-cli for use of Reflect API?
The text was updated successfully, but these errors were encountered: