check the solution here using a directive for spyScroll. It listens to scroll event on the page and highlights the current section in view.
import { Directive, Injectable, Input, EventEmitter, Output, ElementRef, HostListener } from '@angular/core';
@Directive({
selector: '[scrollSpy]'
})
export class ScrollSpyDirective {
@Input() public spiedTags = [];…
Top comments (0)