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

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

@crowmagnumb

Description

@crowmagnumb

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!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions