fix(language-service): get the right 'ElementAst' in the nested HTML tag (#35317)
For example, '<div><p string-model~{cursor}></p></div>', when provide the hover info for 'string-model', the 'path.head' is root tag 'div'. Use the parent of 'path.tail' instead. PR Close #35317
This commit is contained in:
@ -109,7 +109,8 @@ describe('hover', () => {
|
||||
});
|
||||
|
||||
it('should be able to find a reference to a directive', () => {
|
||||
const content = mockHost.override(TEST_TEMPLATE, `<div string-model~{cursor}></div>`);
|
||||
const content =
|
||||
mockHost.override(TEST_TEMPLATE, `<div><div string-model~{cursor}></div></div>`);
|
||||
const marker = mockHost.getLocationMarkerFor(TEST_TEMPLATE, 'cursor');
|
||||
const quickInfo = ngLS.getQuickInfoAtPosition(TEST_TEMPLATE, marker.start);
|
||||
expect(quickInfo).toBeDefined();
|
||||
|
Reference in New Issue
Block a user