user6879896
user6879896

Reputation:

attribute (click) is not allowed in Jade/Pug Templating engine?

Prepros Error: Assigning to rvalue

Error is coming from Element (a). If I remove (click) attribute. It will work. So the error is coming for (a (click) attribute).

pagination-controls(#pagination (pageChange)="currentPage = $event")
    .custom-pagination
        .pagination-previous([class.disabled]= "pagination.isFirstPage()")
            a(*ngIf= "!pagination.isFirstPage()" (click)= "pagination.previous()") Prev

The reason of (click): using Angular2.

I don't know why this doesn't work. Any Idea?

Any help would mean so much to me. Thanks

Upvotes: 2

Views: 425

Answers (1)

hdotluna
hdotluna

Reputation: 5732

You need to wrap (click) to double quotes.

So it should be

a(*ngIf= "!pagination.isFirstPage()" "(click)"= "pagination.previous()") Prev

Hope it helped. Cheers!

Upvotes: 3

Related Questions