There are multiple components used by scrollspy
- Scrollspy service is used to keep track of all and active anchors
- Multiple directives including:
- mac-scroll-spy - Element to spy scroll event
- mac-scroll-spy-anchor - Section in element spying on
- mac-scroll-spy-target - Element to highlight, most likely a nav item
Parameters:
Name | Type | Description |
---|---|---|
register |
function | Register an anchor with the service
|
unregister |
function | Remove anchor from service
|
setActive |
function | Set active anchor and fire all listeners
|
addListener |
function | Add listener when active is set
|
removeListener |
function | Remove listener
|