typescript with relative path in angular4, only the line of DI or declaration shows error, but run well, webpack no error
WebStorm shows me error when I use relative path in DI or declare on component. (setting tsconfig paths)
but actually, webpack shows no error and run app well.
seems like check error. do u have any idea?
if DI , it shows me a question mark at that parameter and if declare on the component, it shows me can't resolve .... relative to ..... other situations seem fine
Please sign in to leave a comment.
Sorry, but what is DI? Can you provide screenshots that show up the issue? What do the errors look like?
like this.
and sorry Dependency Injection in Angular, will show me like this
Both errors come from Angular language service, not from WebStorm itself. Looks related to https://github.com/angular/angular/issues/18484
Try disabling the service (in Settings(Preferences) | Languages & Frameworks | TypeScript, press Configure... next to Use Typescript Service, clear the Use Angular service checkbox) - does the problem persist?
Sorry for my late response. You are right, its gone when I disabled the angular service. so the problem is definitely angular problem...ok...seems they haven't fixed yet.