pc035860 / angular-easyfb

Super easy AngularJS + Facebook JavaScript SDK.
MIT License
440 stars 69 forks source link

Having id of "FB" in templates causes plugin to stop working #47

Open NenadP opened 9 years ago

NenadP commented 9 years ago

There is an issue - if you have markup like this:

<div id="FB"></div>

plugin will fail to initialize.

It is caused by using FB in global scope - in angular-easyfb.js

 $window.FB.init(ezfbInitParams);

https://github.com/pc035860/angular-easyfb/blob/master/angular-easyfb.js#L130

pc035860 commented 9 years ago

Hi @NenadP ,

Any suggestion on this? I thought the only way to use FB JS SDK is accessing it through global scope ($window.FB here)?

NenadP commented 9 years ago

Agh - yes I unserstand now - it is registered there by Facebook JS SDK. So nothing much could be done here I think?

I don't need to use id="FB" :) happily.

Thanks