refactor(language-service): Return directive defs when input name is part of selector (#39243)
When an input name is part of the directive selector, it would be good to return the directive as well when performing 'go to definition' or 'go to type definition'. As an example, this would allow 'go to type definition' for ngIf to take the user to the NgIf directive. 'Go to type definition' would otherwise return no results because the input is a generic type. This would also be the case for all primitive input types. PR Close #39243
This commit is contained in:

committed by
Andrew Kushnir

parent
f9f3c54c9a
commit
5bda62c51d
@ -25,6 +25,7 @@ import * as ParsingCases from './parsing-cases';
|
||||
ParsingCases.TestPipe,
|
||||
ParsingCases.WithContextDirective,
|
||||
ParsingCases.CompoundCustomButtonDirective,
|
||||
ParsingCases.EventSelectorDirective,
|
||||
]
|
||||
})
|
||||
export class AppModule {
|
||||
|
@ -75,6 +75,11 @@ export class CompoundCustomButtonDirective {
|
||||
@Input() config?: {color?: string};
|
||||
}
|
||||
|
||||
@Directive({selector: '[eventSelector]'})
|
||||
export class EventSelectorDirective {
|
||||
@Output() eventSelector = new EventEmitter<void>();
|
||||
}
|
||||
|
||||
@Pipe({
|
||||
name: 'prefixPipe',
|
||||
})
|
||||
|
Reference in New Issue
Block a user