import { NavigationInstruction , Next , PipelineStep } from 'aurelia-router' ; export class ScrollToTopStep implements PipelineStep { run ( instruction , next ) { if ( instruction . router . isNavigatingNew ) { window . scroll ( 0 , 0 ) ; } return next ( ) ; } }