THT is in early Beta. We welcome contributors & feedback.

Session.hasFlash

Session.hasFlash(key)

Description

Return true or false, indicating 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>