-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Calling function 'InjectionToken', function calls are not supported. #16762
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
Comments
I tried to comment out all these usages and tested again and now I get more errors like:
If I create I will probably start removing libraries and dependencies to see if somethign is not related.. |
I found this issue on angular -cli angular/angular-cli#3854 adding path to my tsconfig
But stil not sure what is the real root case. It seems webpack is not able to find and map correct paths? |
@fkolar |
Spent more time on this than I care to mention. fkolar saved me here as well. Many thanks |
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. |
I'm submitting a ... (check one with "x")
Current behavior
when I do
ng build
I get:
Calling function 'InjectionToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol UserConfigToken in ....
I have created token and I am trying to use it as:
Expected behavior
It will compile without these errors
I replaced OpaqueToken with InjectionToken and I think I am using it exactly the same one as in latest angular's 4.1.0 code e.g. when I look at
export const APP_BASE_HREF = new InjectionToken<string>('appBaseHref');
that I am using as well but I dont see any errors for this one.I guess this usecase shoudl work...
What is the motivation / use case for changing the behavior?
OpaqueToken was deprecated
Please tell us about your environment:
I am running on latest Angular 4.1.0 as well as ng 1.0.3
Thanks for any input,
Frank
The text was updated successfully, but these errors were encountered: