@@ -368,11 +368,10 @@ type QueryList_<T> = QueryList<T>& {_valuesTree: any[], _static: boolean};
368
368
* @param read What to save in the query
369
369
* @returns QueryList<T>
370
370
*/
371
- export function query < T > (
371
+ function query < T > (
372
372
// TODO: "read" should be an AbstractType (FW-486)
373
- predicate : Type < any > | string [ ] , descend : boolean , read : any ) : QueryList < T > {
373
+ lView : LView , predicate : Type < any > | string [ ] , descend : boolean , read : any ) : QueryList < T > {
374
374
ngDevMode && assertPreviousIsParent ( getIsParent ( ) ) ;
375
- const lView = getLView ( ) ;
376
375
const queryList = new QueryList < T > ( ) as QueryList_ < T > ;
377
376
const queries = lView [ QUERIES ] || ( lView [ QUERIES ] = new LQueries_ ( null , null , null ) ) ;
378
377
queryList . _valuesTree = [ ] ;
@@ -443,7 +442,7 @@ export function ɵɵviewQuery<T>(
443
442
tView . expandoStartIndex ++ ;
444
443
}
445
444
const index = getCurrentQueryIndex ( ) ;
446
- const viewQuery : QueryList < T > = query < T > ( predicate , descend , read ) ;
445
+ const viewQuery : QueryList < T > = query < T > ( lView , predicate , descend , read ) ;
447
446
store ( index - HEADER_OFFSET , viewQuery ) ;
448
447
setCurrentQueryIndex ( index + 1 ) ;
449
448
return viewQuery ;
@@ -478,7 +477,7 @@ export function ɵɵcontentQuery<T>(
478
477
read : any ) : QueryList < T > {
479
478
const lView = getLView ( ) ;
480
479
const tView = lView [ TVIEW ] ;
481
- const contentQuery : QueryList < T > = query < T > ( predicate , descend , read ) ;
480
+ const contentQuery : QueryList < T > = query < T > ( lView , predicate , descend , read ) ;
482
481
( lView [ CONTENT_QUERIES ] || ( lView [ CONTENT_QUERIES ] = [ ] ) ) . push ( contentQuery ) ;
483
482
if ( tView . firstTemplatePass ) {
484
483
const tViewContentQueries = tView . contentQueries || ( tView . contentQueries = [ ] ) ;
0 commit comments