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
Namespace 'angular' has no exported member 'resource' #6
Comments
Hi @tuxracer! Unfortunately I can't repro this issue in a sandbox. Can you try:
If that doesn't work, can you post your:
Or better yet, a full repro case. |
Closing for lack of activity. @tuxracer feel free to reopen if you can add a repro case. |
Seeing the same with TSC 2.6.1 and the following versions in package.json:
|
@agos Could you post a self-contained repro case as a zip, or on https://stackblitz.com/? |
I explored more, and got it working modifying the above into:
the issue was with the pinned version of the angular types, leading to two different version of the types present at the same time |
@agos @tuxracer I removed the dependency on ngresource in 1.0.0. If you need ngResource in the future, I moved it to its own package ngimport-ngresource. In the meantime, I hope this solves the issue you guys have been having. |
https://github.com/bcherny/ngimport/blob/master/index.ts#L80
$resource = $i.get('$resource') as angular.resource.IResourceService
seems to be failingIf instead of https://github.com/bcherny/ngimport/blob/master/index.ts#L2
import 'angular-resource'
you instead copy/paste the contents ofangular-resource
into that file then it suddenly worked. Somehow that import isn't working.The text was updated successfully, but these errors were encountered: