### File

`packages/components/eui-breadcrumb/breadcrumb.service.ts`

### Index

###### Properties

- Public breadcrumbs$

###### Methods

- addCrumb
- getBreadcrumb
- removeCrumb
- setBreadcrumb
- updateCrumb

### Constructor

`constructor()`

### Methods

addCrumb
`addCrumb(breadCrumbItem: BreadCrumbItem, after?: string, removeAfter)`

Adds a new BreadCrumbItem into the breadcrumb

Parameters :

Name | Type | Optional | Default value | Description
breadCrumbItem | `BreadCrumbItem` | No |  | The BreadCrumbItem you want to insert in trail
after | `string` | Yes |  | The ID of the BreadCrumbItem after given one will be inserted.
removeAfter |  | No | `false` | All crumbs after given ID will be removed.

Returns : `void`

getBreadcrumb
`getBreadcrumb()`
Returns current breadcrumb Returns : `BreadCrumbItem[]`

removeCrumb
`removeCrumb(id?: string)`

Remove a BreadCrumbItem based on a given ID

Example :

          If no id provided then the last item will be popped.

Parameters :

Name | Type | Optional | Description
id | `string` | Yes | Optional: The ID of BreadCrumbItem to be removed If no id provided then the last item will be popped.

Returns : `void`

setBreadcrumb
`setBreadcrumb(breadcrumb: BreadCrumbItem[])`

Sets the breadcrumb

Parameters :

Name | Type | Optional
breadcrumb | `BreadCrumbItem[]` | No

Returns : `void`

updateCrumb
`updateCrumb(item: BreadCrumbItem)`

Update a specific entry in the data structure

Parameters :

Name | Type | Optional
item | `BreadCrumbItem` | No

Returns : `void`

### Properties

Public breadcrumbs$
Type : `Observable<BreadCrumbItem[]>`
An observable on which observers can be notified on breadcrumb changes

# results matching ""

# No results matching ""