2
votes

Just updated my project and import the old file structure used the following:

npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
rmdir /S/Q node_modules dist
npm install --save-dev @angular/cli@latest
npm install

The project is running while using ng serve. When I'm trying to navigate between project files using Ctrl + Click, WebStorm is not recognize the component/html files I need to search them manually.

Is there a way to scan to component for fast navigation as I had before?

enter image description here

enter image description here

enter image description here

enter image description here

2

2 Answers

1
votes

This works for me, but I use WebStorm 2017.1 for Mac OS. Are you using this version or the older one?

Cmd-click on the html file in the template opens that file. Go to Preferences | TypeSript and make sure that the checkbox Use TypeScript Service is selected and under the Configure button Use Angular Service is selected.

0
votes

In case someone will face the same problem:

The problem was that I did not have the angular.js file for the uncompressed version, quick solution: https://blog.jetbrains.com/webstorm/2014/03/angularjs-workflow-in-webstorm/

download the uncomppressed version, Inside webstorem click ctrl + alt + s, Javascript | Libaries | add file, and the angular.js file click ok. it will work.