1.0.3 • Published 5 years ago

eggjs-msg-flash v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

eggjs-msg-flash

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i eggjs-msg-flash --save

Usage

// {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.flash

Questions & Suggestions

Please open an issue here.

License

MIT

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago