zyra / ngx-facebook

Angular TypeScript Wrapper for Facebook SDK
http://zyra.github.io/ngx-facebook/
MIT License
209 stars 70 forks source link

Implement XFBML.parse throughout the API #139

Open simeyla opened 6 years ago

simeyla commented 6 years ago

XFBML.parse needs to run by itself, as necessary whenever a new component is added.

This should be extremely easy to do, just get the ElementRef in (probably) the ngOnViewInit handler and run XFBML.parse only on that node.

The current docs seem to encourage bad behavior by only suggesting the use of FB.init() at the component level. This will probably have performance impact.

Sorry to be mean but this is the most basic basic functionality that a package like this should have. I should be able to just add a <fb-like> wherever I want and only ever care about initializing the API at the root.