<commit_before>import { Router, ActivatedRoute } from '@angular/router';
import { Component, OnInit } from '@angular/core';

import { ItemService } from '../item.service';
import { ItemModel } from '../item.service';

@Component({
    selector: 'app-item-list',
    templateUrl: './item-list.component.html',
    styleUrls: ['./item-list.component.css']
})
export class ItemListComponent implements OnInit {

    public newQuery: string;;
    public query: string;
    public items: ItemModel[] = [];

    constructor(
        private route: ActivatedRoute,
        private router: Router,
        public itemService: ItemService) {
    }

    ngOnInit() {
        this.query = "";
        this.route.queryParams.subscribe(params => {
            if ("q" in params) {
                this.query = params["q"];
            }
            console.log("query: ", this.query);
            this.itemService.search(this.query)
                .subscribe(data => {
                    this.items = data;
                    console.log(data);
                });
        });
    }
<commit_msg>show open status items by default<commit_after>import { Router, ActivatedRoute } from '@angular/router';
import { Component, OnInit } from '@angular/core';

import { ItemService } from '../item.service';
import { ItemModel } from '../item.service';

@Component({
    selector: 'app-item-list',
    templateUrl: './item-list.component.html',
    styleUrls: ['./item-list.component.css']
})
export class ItemListComponent implements OnInit {

    public newQuery: string;;
    public query: string;
    public items: ItemModel[] = [];

    constructor(
        private route: ActivatedRoute,
        private router: Router,
        public itemService: ItemService) {
    }

    ngOnInit() {
        this.query = "";
        this.route.queryParams.subscribe(params => {
            if ("q" in params) {
                this.query = params["q"];
            } else {
                this.query = "state:open";
            }
            console.log("query: ", this.query);
            this.itemService.search(this.query)
                .subscribe(data => {
                    this.items = data;
                    console.log(data);
                });
        });
    }

{'fraction_non_alphanumeric': 0.13664596273291926, 'fraction_numerical': 0.0, 'mean_word_length': 1.9788639365918097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3511173', 'n_tokens_mistral': 619, 'n_tokens_neox': 603, 'n_words': 138}