Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Syntax Error: Assigning to rvalue: Using with Angular Syntax #135

Open
crowmagnumb opened this issue Jan 23, 2020 · 0 comments
Open

Syntax Error: Assigning to rvalue: Using with Angular Syntax #135

crowmagnumb opened this issue Jan 23, 2020 · 0 comments

Comments

@crowmagnumb
Copy link

I use pug to build our Angular html templates and when wrapping an attribute in parantheses to designate a callback function I get the above error. However, pug compiles the code just fine. So if I ignore the linter error I'm fine but I would rather not do that. :)

The following gives me the above error

action-icon(icon="delete" (action)="onActionDelete()" )

but again compiles just fine. However, either one of the following makes the linter happy, but in both cases its extra code (and inconsistent) that I would rather not have to do. I'll accept the linter error over writing special code to avoid the error actually. :) Well, I can live with the comma more than the quotes but still would rather have it all consistent.

action-icon(icon="delete", (action)="onActionDelete()" )
action-icon(icon="delete" "(action)"="onActionDelete()" )

Here are a couple of links to the original pug issue explaining the problem and giving work-arounds which apparently seems to not be an issue anymore since it compiles for me just fine.

pugjs/pug#2050
pugjs/pug#2472

So, I'm just wondering if the error could be snuffed since it now compiles just fine. Or maybe I'm in some edge case where it only works for me?

Thanks for all your hard work!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant