feat(language-service): hover information for component NgModules (#33118)

Enables providing information about the NgModule a component is in when
its selector is hovered on in a template. Also enables differentiation
of a component and a directive when a directive class name is hovered
over in a TypeScript file.

Next step is to enable hover information for directives.

Part of #32565.

PR Close #33118
This commit is contained in:
ayazhafiz
2019-10-11 19:15:07 -05:00
committed by Miško Hevery
parent 0de2a5e408
commit e409ed0eab
4 changed files with 64 additions and 29 deletions

View File

@ -95,7 +95,7 @@ class LanguageServiceImpl implements LanguageService {
this.host.getAnalyzedModules(); // same role as 'synchronizeHostData'
const templateInfo = this.host.getTemplateAstAtPosition(fileName, position);
if (templateInfo) {
return getHover(templateInfo, position);
return getHover(templateInfo, position, this.host);
}
// Attempt to get Angular-specific hover information in a TypeScript file, the NgModule a