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

0
4 comments

Sorry, but what is DI? Can you provide screenshots that show up the issue? What do the errors look like?

0
Avatar
Permanently deleted user

like this.

and sorry Dependency Injection in Angular, will show me like this


 

0

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?

0
Avatar
Permanently deleted user

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. 

0

Please sign in to leave a comment.