ColinEberhardt / applause-button

A zero-configuration medium-style button for adding applause / claps / kudos to web pages and blog posts
http://applause-button.com/
MIT License
426 stars 41 forks source link

Angular 8 + custom url not working #36

Closed juliennix closed 3 years ago

juliennix commented 4 years ago

Hello,

Thanks a lot for this super applause-button widget !

I added it to my angular 8 project using npm and adding the scripts and css via angular.json file. Now, I added the button on my component: <applause-button style="z-index:3; width: 58px; height: 58px;" [url]="applauseBaseUrl + '/' + i"></applause-button>

But when I check the getClap calls, the url is not used. If I use directly url="myHardCodedUrl.com", it is actually working and calls are made with the url parameters.

Any idea how to make it work with angular also ?

Many thanks !

juliennix commented 4 years ago

It could be that the parameter should be lazy loaded: https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties