fix(compiler-cli): support namespaced query types in directives (#38959)
Previously directive "queries" that relied upon a namespaced type ```ts queries: { 'mcontent': new core.ContentChild('test2'), } ``` caused an error to be thrown. This is now supported. PR Close #38959
This commit is contained in:

committed by
atscott

parent
f4fee86f77
commit
2736a43ecb
@ -3064,12 +3064,13 @@ runInEachFileSystem(os => {
|
||||
it('should generate queries for directives', () => {
|
||||
env.write(`test.ts`, `
|
||||
import {Directive, ContentChild, ContentChildren, TemplateRef, ViewChild} from '@angular/core';
|
||||
import * as core from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[test]',
|
||||
queries: {
|
||||
'mview': new ViewChild('test1'),
|
||||
'mcontent': new ContentChild('test2'),
|
||||
'mcontent': new core.ContentChild('test2'),
|
||||
}
|
||||
})
|
||||
class FooCmp {
|
||||
|
Reference in New Issue
Block a user