<commit_before>import {Component} from '@angular/core';
import {EHotelService} from "../../services/ehotel.service";
import {Router} from "@angular/router";
import {IterableObjectPipe} from '../../pipes/iterableObject.pipe';

@Component({
    selector: 'results-component',
    styles: [require('./results.component.scss')],
    template: `
<h1>We have found {{countFound}} hotels matching your inquiry</h1>
<div class="list list--default">
    <div *ngFor="let hotel of hotels" class="hotel__card">
        <h2>{{hotel.name}}<span class="hotel__stars">{{hotel.stars}}</span></h2>
        <div class="hotel__city">{{hotel.address_city}}</div>
        <div class="hotel__rooms">
            <div *ngFor="let room of (hotel.min_price_room | iterableObject)" class="hotel__room">
                <div class="hotel__room-name">{{room.name}}</div>
                <div class="hotel__room-price">{{room.price}}</div>
            </div>
        </div>
    </div>
</div>`,
    pipes: [IterableObjectPipe]
})
export class Results {
    hotels:any;
    countFound:number;

    err:any;

    subscription:any;

    constructor(private hotelService:EHotelService, private router:Router) {
    }

    ngOnInit() {
        this.subscription = this.router
            .routerState
            .queryParams<commit_msg>Link from result to detail<commit_after>import {Component} from '@angular/core';
import {EHotelService} from "../../services/ehotel.service";
import {ROUTER_DIRECTIVES, Router} from "@angular/router";
import {IterableObjectPipe} from '../../pipes/iterableObject.pipe';

@Component({
    selector: 'results-component',
    directives: [
        ...ROUTER_DIRECTIVES,
    ],
    styles: [require('./results.component.scss')],
    template: `
<h1>We have found {{countFound}} hotels matching your inquiry</h1>
<div class="list list--default">
    <div *ngFor="let hotel of hotels" class="hotel__card" [routerLink]="['/detail', hotel.api_key]">
        <h2>{{hotel.name}}<span class="hotel__stars">{{hotel.stars}}</span></h2>
        <div class="hotel__city">{{hotel.address_city}}</div>
        <div class="hotel__rooms">
            <div *ngFor="let room of (hotel.min_price_room | iterableObject)" class="hotel__room">
                <div class="hotel__room-name">{{room.name}}</div>
                <div class="hotel__room-price">{{room.price}}</div>
            </div>
        </div>
    </div>
</div>`,
    pipes: [IterableObjectPipe]
})
export class Results {
    hotels:any;
    countFound:number;

    err:any;

    subscription:any;

    constructor(private hotelService:EHotelService, private router:Router) {
    }

    ngOnInit() {
        this.subscription = this.router
            .routerState
            .queryParams
{'fraction_non_alphanumeric': 0.1650201244054153, 'fraction_numerical': 0.0029271862422246614, 'mean_word_length': 3.1996927803379416, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, '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': '6805197', 'n_tokens_mistral': 874, 'n_tokens_neox': 855, 'n_words': 164}