user111111 user111111 - 11 months ago 117
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

Answer Source

You need to wrap (click) to double quotes.

So it should be

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

Hope it helped. Cheers!