fixate / angular-social-links

Flexible and easy social sharing directives for Twitter, Google plus and Facebook
http://fixate.github.io/angular-social-links/demo/
44 stars 12 forks source link

twitter window was caching old link #2

Closed superwills closed 9 months ago

superwills commented 9 years ago

If you change the url after the hash, the twitter link would be out of date

larrybotha commented 9 years ago

@superwills can you make this PR using coffeescript? All js files are compiled via Grunt; we don't write in vanilla js.

DmitryEfimenko commented 8 years ago

The issue is still there. Whenever the state changes, the share uses the very first loaded url. The appropriate fix is

var status = scope.status || ("Check this out! - " + url);
return "https://twitter.com/intent/tweet?text=" + (encodeURIComponent(status));

This way variable status is recalculated every click. I don't know coffee script. I'm sure it's not hard, but I don't want to invest my time in it. These days people are using TypeScript.

Please just make the fix and close this PR.