eggjs-msg-flash
v1.0.3
Published
[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down
Readme
eggjs-msg-flash
Install
$ npm i eggjs-msg-flash --saveUsage
// {app_root}/config/plugin.js
exports.msgFlash = {
enable: true,
package: 'eggjs-msg-flash',
};Configuration
// {app_root}/config/config.default.js
exports.msgFlash = {
};see config/config.default.js for more detail.
Example
ctx.flash = {
type: 'success',
message: {
some: 'one'
}
}
// or
ctx.flash_success({some:'one'})
ctx.flash_error()
ctx.flash_info()
ctx.flash_warning()
ctx.request.flash(type, message)
// get message by
ctx.flashQuestions & Suggestions
Please open an issue here.
