@rsession/novation-auth-modal
v1.2.1
Published
Vue.js 2 component for application login form modal
Downloads
6
Readme
Installation
Install through NPM
npm install --save @rsession/novation-auth-modal
Usage
Import Vue.js component into your main application file
Vue.component('login-modal', require('@rsession/novation-auth-modal'))
Include component within your the application's main layout near the bottom
<login-modal></login-modal>
Available Options
|Property|Type|Default|Required|Description| |--------|----|-------|--------|-----------| |app-name|String| |Yes|Application name that is shown in modal header| |action|String| |Yes|URL that represents the form action| |csrf-token|String| |Yes|CSRF token for the request|
Example Usage
Axios
axios({
method: 'post',
url: '/test',
data: {
params: {
...
}
},
headers: {
'X-Requested-With': 'XMLHttpRequest',
}
})
.then(resp => {
...
})
.catch(err => this.$root.$emit('openAuthModal'))