fix(compiler): Query expression lambdas should have dynamic type
Fixes: #9875
This commit is contained in:
@ -6,7 +6,8 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, QueryList, ViewChild, ViewChildren} from '@angular/core';
|
||||
import {NgFor} from '@angular/common';
|
||||
import {Component, Directive, QueryList, ViewChild, ViewChildren} from '@angular/core';
|
||||
|
||||
@Component({selector: 'comp-for-child-query', template: 'child'})
|
||||
export class CompForChildQuery {
|
||||
@ -21,3 +22,20 @@ export class CompWithChildQuery {
|
||||
@ViewChild(CompForChildQuery) child: CompForChildQuery;
|
||||
@ViewChildren(CompForChildQuery) children: QueryList<CompForChildQuery>;
|
||||
}
|
||||
|
||||
@Directive({selector: '[directive-for-query]'})
|
||||
export class DirectiveForQuery {
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'comp-with-directive-child',
|
||||
directives: [DirectiveForQuery, NgFor],
|
||||
template: `<div>
|
||||
<div *ngFor="let data of divData" directive-for-query>{{data}}</div>
|
||||
</div>`
|
||||
})
|
||||
export class CompWithDirectiveChild {
|
||||
@ViewChildren(DirectiveForQuery) children: QueryList<DirectiveForQuery>;
|
||||
|
||||
divData: string[];
|
||||
}
|
||||
|
Reference in New Issue
Block a user