*ngFor loop not rendering correctly with ngx-fullpage

25 views
Skip to first unread message

rahul....@gmail.com

unread,
Jul 20, 2017, 7:17:36 AM7/20/17
to Angular and AngularJS discussion

I'm using ngx-fullpage package with Angular 4. When I try to dynamically include the data using *ngFor loop the data is getting rendered on the page but the navigation icons are not appearing. Like in the below example, slide with content "1" and "2" is rendered correctly with 2 bullets appearing on the page for navigation however the bullets are not appearing for the data which is being rendered through *ngFor loop.





page-content.component.html

<div mnFullpage [mnFullpageNavigation]="true" [mnFullpageNavigationPosition]="right">
  <div class="section welcome-section fp-section fp-table">
    <div class="fp-tableCell">
      1
    </div>
  </div>
  <div class="section welcome-section fp-section fp-table">
    <div class="fp-tableCell">
      2
    </div>
  </div>
  <div class="section welcome-section fp-section fp-table" *ngFor="let section of sections">
    <div class="fp-tableCell">
      <app-question-card [data]="section" *ngIf="section.type == 'question-card'"></app-question-card>
      <app-flipping-card [data]="section" *ngIf="section.type == 'flipping-card'"></app-flipping-card>
    </div>
  </div>
</div>

rahul....@gmail.com

unread,
Jul 20, 2017, 7:17:36 AM7/20/17
to Angular and AngularJS discussion
I'm using ngx-fullpage package with Angular 4. When I try to dynamically include the data using *ngFor loop the data is getting rendered on the page but the navigation icons are not appearing. Like in the below example, slide with content "1" and "2" is rendered correctly with 2 bullets appearing on the page for navigation however the bullets are not appearing for the data which is being rendered through *ngFor loop.

Sander Elias

unread,
Jul 21, 2017, 1:51:04 AM7/21/17
to Angular and AngularJS discussion
Hi Rahul,

It is hard to help you without a working sample of what goes wrong. Helping you becomes way more easy if you provide a plunk/fiddle/jsbin/.. with your issue demonstrated. Or perhaps even a small github repo.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages