Open Dpavlova opened 6 years ago
The best thing to do is to inject the Facebook provider in the constructor of your app's main component. This ensures that Facebook's SDK is always initialized when your app is running. If you are just using the components (HTML tags), then you only need to inject the service once.
Hello, I am building an angular4 app and I want to display a facebook page with the like button.
The problem is that the facebook is called into the constructor and on each change of the pages of my website, the facebook page dissapears. My question is, is there a way to make the facebook run on init instead of adding it into the constructor?