# Navigation Guard
# Plugin
This makes use of the 'dirty' state of the open entity detail view. The backoffice should
add the navigation-guard to the nuxt plugins in nuxt.config.js
:
# Import
Create a new file in the backoffice: /plugins/navigation-guard.js
with the following contents:
import { navigationGuardPlugin } from '@jdi/vue-backoffice-library'
export default (context) => navigationGuardPlugin.install(context)
# Usage
Add the plugin to nuxt.config.js
const plugins = [
'./plugins/runtime',
'./plugins/axios',
'./plugins/element-ui',
'./plugins/i18n',
'./plugins/vue-good-table',
'./plugins/navigation-guard' // Add this one
]