ngx-owl-carousel
ngx-owl-carousel copied to clipboard
Issue with isBrowser variable from patform
I'm using your component in aspnetcore-angular2-universal project in my site. I have issue when add the component into the other component view. So the variable which is set in code behind stopped to refresh the value into the view:
In. ts file: public isBrowser = isPlatformBrowser(this.platformId); //cheched that is true in ngOnInit state
print the variable in .html view: {{isBrowser}}. In the view with carousel the value is false, without is correct - true.
More info in this issue: https://github.com/MarkPieszak/aspnetcore-angular2-universal/issues/552
Hi @GetTaxSolutions ,
If you install the latest version using npm install ngx-owl-carousel@latest --save
then you can now remove *ngIf="isBrowser" from owl-carousel tag in your code.
Hope this resolve your problem.
With last version *ngIf="isBrowser is not needed - it's work ok. But the issue with isBrowser wasn't fixed. If I have some other component which have to check for this property and owl-carousel is in the component - it's not appear.
I'm trying to setup and test it into separate sandbox project to reproduce the issue but have some impediments. It can't find jquery $ variable: https://stackblitz.com/edit/angular-8nkxbm?file=app%2Fapp.component.ts Can you try to setup to work properly?