Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Session.hasFlash

Session.hasFlash($key) -> boolean

Description

Return true if the flash $key has been set for the current session via Session.setFlash.

// ... process user action ...

Session.setFlash('message', 'Congratulations!')


// ... in the NEXT request only ...

// In HTML template
--- if (Session.hasFlash('message')) {
    <div>{{ Session.getFlash('message') }}</div>
--- }

//= <div>Congratulations!</div>