-
Notifications
You must be signed in to change notification settings - Fork 1
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 4 - Can't resolve all parameters for "MyService" when import a Decorator #2
Comments
After some tests, I think this happens when execute: I found this reflect-metadata import on this file https://github.com/artifacthealth/reflect-helper/blob/master/src/util.ts. Can you confirm this problem? |
Hey @mfdeveloper - The library wasn't really intended to be used with Angular injection. Angular has it's own helper functions for creating annotations. This library is for creating Angular-style annotations for use outside of Angular. For example, in a NodeJS application. |
@meirgottlieb Thank you for your response. I understand now this approach of this library. But, I tried use this, because the Angular helper functions for create decorators with reflection, aren't accessible anymore. Is just to use in core Angular annotations now (e.g. like Do you have some suggestion or another alternative? |
If you can put together and example project that gets the error, I'll take a look. |
@meirgottlieb Sorry for my late response. I've created a new angular To see the list of changed/created files, run: git diff-tree --no-commit-id --name-only -r [COMMIT_HASH]
Or open this project with your favorite git GUI tool. Example project: angular-reflect.zip Running project
Open the browser on: http://localhost:4200. The console shows: |
This problem happens when I create a decorator with the
makeDecorator()
in a specific file, and annotate a Angular service/provider. I'm using latest angular 4 and reflect-helper1.1.0
See my code snippet below:
my-decorator.ts
my-service.ts
my-module.ts
Can you help me? Maybe can be a conflict with Angular core
makeDecorator()
function. I was using this function before, but, in latest Angular versions, this function is only to INTERNAL use 😢The text was updated successfully, but these errors were encountered: