knockout-contrib

:metal: KnockoutJS Goodies Monorepo

View the Project on GitHub Profiscience/knockout-contrib

router.middleware.scrollPosition

Version Dependency Status Peer Dependency Status Dev Dependency Status Downloads

Add support for:

Usage

import {
  Router,
  createScrollPositionMiddleware
} from '@profiscience/knockout-contrib'

Router.use(
  createScrollPositionMiddleware({
    // optionally supply a custom scroll function (add smooth scrolling, use Velocity, etc.)
    scrollTo(x, y) { ... }
  })
)