---
title: navigation
source: https://docs.newrelic.com/docs/new-relic-solutions/build-nr-ui/sdk-component/platform-apis/navigation
---

### Usage

```js
import { navigation } from 'nr1'
```

### Methods

### `navigation.getOpenEntityLocation`

```js
const entityGuid = 'Mxka102Ak';


const location = navigation.getOpenEntityLocation(entityGuid);
```

### `navigation.getOpenLauncherLocation`

```js
const launcher = {
  id: 'nr1-core.explorer',
};


const location = navigation.getOpenLauncherLocation(launcher);
```

```js
// You can also specify a nerdlet and stacked nerdlets to be opened.
// You can combine Nerdpack items from different nerdpacks.
const launcher = {
  id: '074e8260-fa9c-4d71-f7a0-51835417a423.my-launcher-id',
  nerdlet: {
    id: 'nr1-core.listing',
  },
  stackedNerdlets: [
    {
      id: 'dashboards.list',
    },
  ],
};


const location = navigation.getOpenLauncherLocation(launcher);
```

### `navigation.getOpenNerdletLocation`

```js
const nerdlet = {
  id: 'dashboards.list',
};


const location = navigation.getOpenNerdletLocation(nerdlet);
```

```js
// You can also specify nerdlet's state.
const nerdlet = {
  id: 'dashboards.list',
  urlState: {
    foo: 'bar',
  },
};


const location = navigation.getOpenNerdletLocation(nerdlet);
```

### `navigation.getOpenStackedEntityLocation`

```js
const entityGuid = 'Mxka102Ak';


const location = navigation.getOpenStackedEntityLocation(entityGuid);
```

### `navigation.getOpenStackedNerdletLocation`

```js
const nerdlet = {
  id: 'dashboards.list',
};


const location = navigation.getOpenStackedNerdletLocation(nerdlet);
```

```js
// You can also specify nerdlet's state.
const nerdletWithState = {
  id: 'dashboards.list',
  urlState: {
    foo: 'bar',
  },
};


const location = navigation.getOpenStackedNerdletLocation(nerdletWithState);
```

```js
// If you want to open nerdlet from the current nerdpack then you can omit its nerdpackId.
const nerdletWithState = {
  id: 'my-nerdlet-id',
  urlState: {
    foo: 'bar',
  },
};


const location = navigation.getOpenStackedNerdletLocation(nerdletWithState);
```

### `navigation.getReplaceNerdletLocation`

```js
const nerdlet = {
  id: 'dashboards.list',
};


const location = navigation.getReplaceNerdletLocation(nerdlet);
```

```js
// If the nerdlet you want to replace with is in the current nerdpack then you can omit its nerdpackId.
const nerdlet = {
  id: 'my-nerdlet-id',
};


const location = navigation.getReplaceNerdletLocation(nerdlet);
```

```js
// You can also specify nerdlet's state.
const nerdlet = {
  id: 'my-nerdlet-id',
  urlState: {
    foo: 'bar',
  },
};


const location = navigation.getReplaceNerdletLocation(nerdlet);
```

### `navigation.openEntity`

```js
const entityGuid = 'Mxka102Ak';


navigation.openEntity(entityGuid);
```

### `navigation.openLauncher`

```js
const launcher = {
  id: 'nr1-core.explorer',
};


navigation.openLauncher(launcher);
```

```js
// You can also specify a nerdlet and stacked nerdlets to be opened.
// You can combine Nerdpack items from different nerdpacks.
const launcher = {
  id: '074e8260-fa9c-4d71-f7a0-51835417a423.my-launcher-id',
  nerdlet: {
    id: 'nr1-core.listing',
  },
  stackedNerdlets: [
    {
      id: 'dashboards.list',
    },
  ],
};


navigation.openLauncher(launcher);
```

### `navigation.openNerdlet`

```js
const nerdlet = {
  id: 'dashboards.list',
};


navigation.openNerdlet(nerdlet);
```

```js
// You can also specify nerdlet's state.
const nerdletWithState = {
  id: 'dashboards.list',
  urlState: {
    foo: 'bar',
  }
};


const location = navigation.getOpenNerdletLocation(nerdletWithState);
```

### `navigation.openStackedEntity`

```js
// Opens stacked entity.
const entityGuid = 'Mxka102Ak';


navigation.openStackedEntity(entityGuid);
```

### `navigation.openStackedNerdlet`

```js
const nerdlet = {
  id: 'dashboards.list',
};


navigation.openStackedNerdlet(nerdlet);
```

```js
// You can also specify nerdlet's state.
const nerdletWithState = {
  id: '074e8260-fa9c-4d71-f7a0-51835417a423.my-nerdlet-id',
  urlState: {
    foo: 'bar',
  }
};


navigation.openStackedNerdlet(nerdlet);
```

```js
// If you want to open nerdlet from the current nerdpack then you can omit its nerdpackId.
const nerdletWithState = {
  id: 'my-nerdlet-id',
  urlState: {
    foo: 'bar',
  }
};


navigation.openStackedNerdlet(nerdlet);
```

### `navigation.replaceNerdlet`

```js
const nerdlet = {
  id: 'dashboards.list',
};


navigation.replaceNerdlet(nerdlet);
```

```js
// If the nerdlet you want to replace with is in the current nerdpack then you can omit its nerdpackId.
const nerdlet = {
  id: 'my-nerdlet-id',
};


navigation.replaceNerdlet(nerdlet);
```

```js
// You can also specify nerdlet's state.
const nerdlet = {
  id: 'my-nerdlet-id',
  urlState: {
    foo: 'bar',
  },
};


navigation.replaceNerdlet(nerdlet);
```

### Type definitions
