Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any>| Comp
// Run parent features
const features = superDef.features;
if (features) {
for (const feature of features) {
for (let i = 0; i < features.length; i++) {
const feature = features[i];
if (feature && feature.ngInherit) {
(feature as DirectiveDefFeature)(definition);
}
Expand Down
17 changes: 9 additions & 8 deletions packages/core/src/render3/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ class TQueries_ implements TQueries {
elementStart(tView: TView, tNode: TNode): void {
ngDevMode && assertFirstTemplatePass(
tView, 'Queries should collect results on the first template pass only');
for (let query of this.queries) {
query.elementStart(tView, tNode);
for (let i = 0; i < this.queries.length; i++) {
this.queries[i].elementStart(tView, tNode);
}
}
elementEnd(tNode: TNode): void {
for (let query of this.queries) {
query.elementEnd(tNode);
for (let i = 0; i < this.queries.length; i++) {
this.queries[i].elementEnd(tNode);
}
}
embeddedTView(tNode: TNode): TQueries|null {
Expand All @@ -123,8 +123,8 @@ class TQueries_ implements TQueries {
template(tView: TView, tNode: TNode): void {
ngDevMode && assertFirstTemplatePass(
tView, 'Queries should collect results on the first template pass only');
for (let query of this.queries) {
query.template(tView, tNode);
for (let i = 0; i < this.queries.length; i++) {
this.queries[i].template(tView, tNode);
}
}

Expand Down Expand Up @@ -367,8 +367,9 @@ function collectQueryResults<T>(lView: LView, queryIndex: number, result: T[]):
// collect matches for views created from this declaration container and inserted into
// different containers
if (declarationLContainer[MOVED_VIEWS] !== null) {
for (let embeddedLView of declarationLContainer[MOVED_VIEWS] !) {
collectQueryResults(embeddedLView, childQueryIndex, result);
const embeddedLViews = declarationLContainer[MOVED_VIEWS] !;
for (let i = 0; i < embeddedLViews.length; i++) {
collectQueryResults(embeddedLViews[i], childQueryIndex, result);
}
}
}
Expand Down