dart-archive/angular_analyzer_plugin

Weirdnesses with keywords in star attrs

Opened this issue · 0 comments

I thought I had seen that

<div *ngFor="if <-- now that we have a keyword we can write anything we want and get no errors!">
``

it stops parsing on the keyword, and ignores the rest. This makes `in` in an `ngFor` harder to diagnose:

```

where the only error is "star attr did not get a directive" since it didn't match [ngForOf].

And that it was possible to have no errors show up whatsoever in contrived cases:

<div *ngFor="let item of items if <-- now everything! ** is -- ignored&&!*)"(">

However, I also saw one person saying that in the let item in items that they got "unexpected keyword" for "in".

So some reproduction work to do here -- why didn't it show up for me? Can I still reproduce this?

Also, what's the best error that we can show without doing too much NgFor-specific specialization?