user111111 user111111 - 4 months ago 65
Jade Question

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")
.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


You need to wrap (click) to double quotes.

So it should be

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

Hope it helped. Cheers!