I’ve been diving into AngularJS lately and came across a use-case where my Facebook Social Plugin-containing Angular templates were being rendered after the Facebook SDK’s init and parse method had already been called. Sad faces ensued as my Facebook Social Plugins were no where to be found in the rendered template. To work around this I’ve created a set of directives that will automatically parse Facebook plugins as they’re rendered by Angular.

Feel free to download the compiled JavaScript here.

Caveat: The above code snippet only works for plugins instantiated using the HTML5 class-based method.