<commit_before>import {
  SearchService, ISearchQuery
} from './searchbar-service';

export class Searchbar {
  public searching: boolean = false;
  public searchString: string = '';
  public after: Date;
  public before: Date;

  constructor(
      private _searchService: SearchService,
      private _$log: ng.ILogService
  ) {
  }

  search() {
    const searchQuery: ISearchQuery = {
      query: this.searchString,
      before: null,
      after: null
    };
    this._searchService.search(searchQuery).then(this._$log.info);
  }

  static directive(): angular.IDirective {
    return {
      controller: Searchbar,
      controllerAs: 'state',
      bindToController: true,
      scope: {},
      templateUrl: '/mtna/searchbar/searchbar-template.html'
    };
  }

  static selector: string = 'mtnaSearchbar';
  static $inject: string[] = [SearchService.serviceName, '$log'];
  static $depends: string[] = [
    'ngMaterial',
    SearchService.module.name
  ];
  static module: angular.IModule = angular.module(
    'mtna.archive.searchbar', Searchbar.$depends
  ).directive(Searchbar.selector, Searchbar.directive);
}
<commit_msg>Pasing the correct parameters to the service for search.<commit_after>import {
  SearchService, ISearchQuery
} from './searchbar-service';

export class Searchbar {
  public searching: boolean = false;
  public searchString: string = '';
  public after: Date;
  public before: Date;

  constructor(
      private _searchService: SearchService,
      private _$log: ng.ILogService
  ) {
  }

  search() {
    const searchQuery: ISearchQuery = {
      query: this.searchString,
      before: this.before,
      after: this.after
    };
    this._searchService.search(searchQuery).then(this._$log.info);
  }

  static directive(): angular.IDirective {
    return {
      controller: Searchbar,
      controllerAs: 'state',
      bindToController: true,
      scope: {},
      templateUrl: '/mtna/searchbar/searchbar-template.html'
    };
  }

  static selector: string = 'mtnaSearchbar';
  static $inject: string[] = [SearchService.serviceName, '$log'];
  static $depends: string[] = [
    'ngMaterial',
    SearchService.module.name
  ];
  static module: angular.IModule = angular.module(
    'mtna.archive.searchbar', Searchbar.$depends
  ).directive(Searchbar.selector, Searchbar.directive);
}

{'fraction_non_alphanumeric': 0.12221269296740996, 'fraction_numerical': 0.0, 'mean_word_length': 3.3853383458646618, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3394073', 'n_tokens_mistral': 704, 'n_tokens_neox': 695, 'n_words': 156}