maleblond / angular-fusejs

Angular 2 plugin using fuse.js to search through a list of elements with a string. Supports highlight.
https://maleblond.github.io/angular-fusejs/
MIT License
4 stars 10 forks source link

Cannot override `defaultOptions` #3

Open drewdaemon opened 6 years ago

drewdaemon commented 6 years ago

According to the docs on NPM:

You can override those default options by injecting FusejsService in your app and setting FusejsService.defaultOptions to whatever you want.

This doesn't work because FusejsService.defaultOptions is a private property.

My code:

constructor(
    public fuseService: FusejsService,
  ) {
    this.fuseService.defaultOptions = this.searchOpts;
  }