:metal: KnockoutJS Goodies Monorepo
NOTE: This package is intended for consumption via the @profiscience/knockout-contrib metapackage
Eases creation of loading middlware
import { Router, createLoadingMiddleware } from '@profiscience/knockout-contrib'
Router.use(
createLoadingMiddleware({
start() {
showLoader()
},
end() {
hideLoader()
},
/* OPTIONAL */
minDuration: 0, // prevent flickering on fast navigation (show loader for at least <n> ms)
})
)