<commit_before>import { Component } from '@angular/core';

require('style!blackbaud-skyux2/dist/css/sky.css');
require('style!./app.component.scss');

@Component({
  selector: 'sky-pages-app',
  templateUrl: './app.component.html'
})
export class AppComponent { }
<commit_msg>Scroll to the top of the page when navigating<commit_after>import { Component, OnInit } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';

require('style!blackbaud-skyux2/dist/css/sky.css');
require('style!./app.component.scss');

@Component({
  selector: 'sky-pages-app',
  templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
  constructor(private router: Router) { }

  public ngOnInit() {
    // Without this code, navigating to a new route doesn't cause the window to be
    // scrolled to the top like the browser does automatically with non-SPA navigation.
    this.router.events.filter(event =>
      event instanceof NavigationEnd
    ).subscribe(event => {
      window.scroll(0, 0);
    });
  }
}

{'fraction_non_alphanumeric': 0.1416267942583732, 'fraction_numerical': 0.003827751196172249, 'mean_word_length': 4.23, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2326478', 'n_tokens_mistral': 321, 'n_tokens_neox': 313, 'n_words': 82}