Skip to content

Scroll doesn't work with ngForΒ #9

@doidd

Description

@doidd

I following demo and simple edit code like this
<ul>
<li *ngFor="let num of [1,2,3,4,5,6,7,8,9,10]" [class.current]="id == 's'+ num " (click)="scrollTo('#s'+num, '#v-scrollable')">{{num}}
</ul>

scrolled to: {{id}}
<div id="v-scrollable" class="scrollable section" ng2-scrollable (elementVisible)="id = $event.id">
<div *ngFor="let num of [1,2,3,4,5,6,7,8,9,10]" [id]="'s'+ num ">
Section {{num}} (scroll to here)
</div>
</div>
but demo don't work. How can i fix that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions