Question: Getting the error 

> 
> Property 'includes' does not exist on type 'string[]'
> 
> 
> 

in node\_modules/ng2-breadcrumb/app/components/breadcrumbService.ts
I am trying to implement breadcrumb functionality in an angular2 app.

Answer: 
Add `"ES2017"` to your `"lib"` array in `tsconfig.json`:

```
{
  "compilerOptions": {
    ...
    "lib": ["es6", "dom", "es2017"],
    ...
    "target": "es5",
    ...
  }
}

```

This should work since TypeScript 2.1.

A [related issue](https://github.com/Microsoft/TypeScript/issues/2340).

Explanation
===========

The [`includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Specifications) method on `Array` is supported since ES7 (ES2016). The above will add a missing library file to compilation.

The TypeScript compiler options are documented [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html).

Lib `es2016` or `es7` may be sufficient instead of `es2017` (not tested).
You're probably trying to call .includes() on a set rather than an array. Try calling .has() instead