$flash

A session-scoped object for passing messages to views.

Summary
$flashA session-scoped object for passing messages to views.
Functions
setsets a flash message
getreturns a flash message
getMessagesreturns an HTML string including all flash messages
Properties
datacontains all the current flash messages

Functions

set

set:function(options,
value)

sets a flash message

Parameter Pattern 1

messagemessage to set as the “defaultMessage”

Parameter Pattern 2

keymessage key to set
messagemessage to set

Parameter Pattern 2

messagesA JS object where each each key is a flash key and each value is a flash message

get

get:function(key)

returns a flash message

Parameters

keyOptional, default “defaultMessage” flash key to return

Note

”Get”ing a key erases that key.

getMessages

getMessages:function()

returns an HTML string including all flash messages

Also empties the flash

Properties

data

contains all the current flash messages

set:function(options,
value)
sets a flash message
get:function(key)
returns a flash message
getMessages:function()
returns an HTML string including all flash messages