angular2-switcher icon indicating copy to clipboard operation
angular2-switcher copied to clipboard

Go to definition does not work correctly

Open BlindDespair opened this issue 6 years ago • 0 comments

Go to definition from template to a variable is not handled properly in next cases:

  1. Local template variable leads not to its definition inside the template but to a local class field in typescript file that also has similar name. Example: <div *ngFor='let item of board.items'>{{item.name}}</div>
class Component {
  board: Board;
  itemToShare: Item;
}

Here it goes to ts file to itemToShare instead of definition in ngFor when you go to definition from {{item.name}} 2. There are 2 class fields with a similar name Example:

class Component {
  currentBoards$: Observable<Board>;
  currentBoard: Board;
}

Here when you go to definition of currentBoard from a template it goes to currentBoards$ 3. Definition of event Example:

<app-dialog (close)='closeDownloadErrorDialog()'></app-dialog>
<app-dialog (close)='closeSharingDialog()'></app-dialog>

Here when you go to definition of close event no matter which one it goes to definition of closeDownloadErrorDialog.

Seems like missing features:

  1. Go to definition of directive
  2. Go to definition of component
  3. Go to definition of binding/attribute/event
  4. Go to definition of pipe

These are very important and useful features that are working great in WebStorm and this is what holds me back from fully accepting VS Code as an alternative, although I am grateful for your work and it really makes it pretty close now, but I hope these issues can be addressed.

BlindDespair avatar May 28 '19 09:05 BlindDespair