fix(ng-content): wildcard ng-content has to go last.
This was the case before the new compiler landed and should be preserved. Related to #4598 Closes #5016
This commit is contained in:
@ -655,12 +655,12 @@ class Component {
|
||||
|
||||
findNgContentIndex(selector: CssSelector): number {
|
||||
var ngContentIndices = [];
|
||||
if (isPresent(this.wildcardNgContentIndex)) {
|
||||
ngContentIndices.push(this.wildcardNgContentIndex);
|
||||
}
|
||||
this.ngContentIndexMatcher.match(
|
||||
selector, (selector, ngContentIndex) => { ngContentIndices.push(ngContentIndex); });
|
||||
ListWrapper.sort(ngContentIndices);
|
||||
if (isPresent(this.wildcardNgContentIndex)) {
|
||||
ngContentIndices.push(this.wildcardNgContentIndex);
|
||||
}
|
||||
return ngContentIndices.length > 0 ? ngContentIndices[0] : null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user