Show:
Extends Ember.Component

Implements Bootstrap alerts, see http://getbootstrap.com/components/#alerts

By default it is a user dismissible alert with a fade out animation, both of which can be disabled. Be sure to set the type property for proper styling.

{{#bs-alert type="success"}}<strong>Well done!</strong> You successfully read this important alert message.{{/bs-alert}}

Methods

show

() public

Call to make the alert visible again after it has been hidden

show

() public

Call to hide the alert. If the fade property is true, this will fade out the alert before being finally dismissed.

Properties

alert

Boolean private

Computed property to set the alert class to the component div. Will be false when dismissed to have the component div (which cannot be removed form DOM by the component itself) without any markup.

classTypePrefix

String protected

Default: 'alert'

dismissed

Boolean protected

If true the alert is completely hidden. Will be set when the fade animation has finished.

Default: false

dismissible

Boolean public

A dismissible alert will have a close button in the upper right corner, that the user can click to dismiss the alert.

Default: true

fade

Boolean public

Set to false to disable the fade out animation when hiding the alert.

Default: true

fadeDuration

Integer public

The duration of the fade out animation

Default: 150

type

String

Property for type styling

For the available types see the Bootstrap docs (use without "btn-" prefix)

Default: 'default'

visible

Boolean public

This property indicates if the alert is visible. If false it might still be in the DOM until the fade animation has completed. Can be set to change the visibility of the alert box.

Default: true