Closed shaharkazaz closed 2 years ago
@fkling Can you please review? 🙂
@fkling Can this be reviewed? still crashes the site
Thank you for taking the time to fix this @shaharkazaz! I apologize for being negligent with keep astexplorer up-to-date... Since I'm not familiar with the Angular parser there is not much for me to review, I trust that this is the right thing to do. It certainly fixes the issues you pointed out. Thank you again!
This PR fixes the following issues:
This is caused by the
fixSpan
method, which isn't handling bound attributes from structural directives and has awhile
loop with a stop condition that doesn't meet in this case.=
index after the attribute, for example:ngForOf
bound attribute should have the following span:{start: 22, end: 28}
but it actually resolves to{start: 39, end: 45}
which is the=
char index of the template variablei
.ngForTrackBy
bound attribute should have the following span:{start: 59, end: 68}
but it actually resolves to{start: 92, end: 102}
which is the=
char of theclass.odd
bound attribute.[class.odd]="odd"
)The span for this attribute should be
{start: 92, end: 95}
but it's actually{start: 184, end: 187}
this is because this attribute is referenced both as an input to theTemplate
node and as an input to theElement
node (thediv
)