<commit_before>import {Component, OnInit} from "@angular/core";
import {ActivatedRoute, Params} from "@angular/router";
import {MisquoteService} from "../services/misquote-service";
import {Misquote} from "../classes/misquote";

@Component({
	templateUrl: "./templates/misquote.php"
})

export class MisquoteComponent implements OnInit {
	misquote: Misquote;

	constructor(private misquoteService: MisquoteService,  private route: ActivatedRoute) {}

	ngOnInit() : void {
		this.route.params.forEach((params : Params) => {
			let misquoteId = +params["misquoteId"];
		});
	}
}<commit_msg>added autoloading of a misquote<commit_after>import {Component, OnInit} from "@angular/core";
import {ActivatedRoute, Params} from "@angular/router";
import {MisquoteService} from "../services/misquote-service";
import {Misquote} from "../classes/misquote";

@Component({
	templateUrl: "./templates/misquote.php"
})

export class MisquoteComponent implements OnInit {
	misquote: Misquote = null;

	constructor(private misquoteService: MisquoteService, private route: ActivatedRoute) {}

	ngOnInit() : void {
		this.route.params.forEach((params : Params) => {
			let misquoteId = +params["misquoteId"];
			this.misquoteService.getMisquote(misquoteId)
				.subscribe(misquote => this.misquote = misquote);
		});
	}
}
{'fraction_non_alphanumeric': 0.14208909370199693, 'fraction_numerical': 0.0, 'mean_word_length': 5.614213197969543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2998133', 'n_tokens_mistral': 428, 'n_tokens_neox': 395, 'n_words': 91}