Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fb-page does not display inside *ngIf or ng-template #147

Open
skidvd opened this issue Jan 17, 2019 · 1 comment
Open

fb-page does not display inside *ngIf or ng-template #147

skidvd opened this issue Jan 17, 2019 · 1 comment

Comments

@skidvd
Copy link

skidvd commented Jan 17, 2019

Hi have added this inside the index.html:

<script type="text/javascript" src="https://connect.facebook.net/en_US/sdk.js"></script>

And also added this inside the app.module:

import { FacebookModule } from 'ngx-facebook';
..
FacebookModule.forRoot(),

And also added this inside a component template:

<fb-page href="https://facebook.com/zyramedia" tabs="events,timeline,messages"></fb-page>

If the is directly included in the component's template, then it is displayed correctly. However, if the is inside of a *ngIf or a conditionally included it is NOT displayed/processed.

It appears that I can force the conditionally included to be processed by forcing a call to

window.FB.XFBML.parse()

but this feels like a kludge/hack that should not be required for the fb-page to be recognized and rendered properly?

@artix-paladin
Copy link

@skidvd Hello, did you found any solution for this. I have the same problem with fb-video component !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants