Notification

An alert that pins to the corner of the screen when triggered by JavaScript.

A custom action can be assigned to a notification as well. By default, all notifications can be swiped to close them. You can also set an `autoclose` attribute equal to a number (measured in milliseconds) to have the notification disappear after the specified amount of time. Please note that due to dynamic DOM insertion and animations, we recommend an autoclose value of at least 1000ms.

Dynamic Notification Static Notification This notification is static, it works similarly to a programmatic with some subtle differences. I'll stay here until you close me!

There are two ways to access a notification. One via the static method and also dynamically (programmatic).

Basic HTML

The static method is best used for prototyping since it doesn't involve any programming.

You can create a Static Notification with this basic HTML:

Static Notification

This notification is static, it works similarly to a programmatic with some subtle differences.

Static Notification

Advanced HTML

The Foundation Api service is pretty useful, one function of it is to send information from directives, controllers, and other parts to other directives, controllers, etc. It's a messaging system for the entire application.

You can create a Dynamic Notification with this basic HTML:

Dynamic Notification
Dynamic Notification

And then send it a notification with via FoundationApi:

foundationApi.publish('main-notifications', { title: 'Test', content: 'Test2' });

You can also use the `zf-notify` directive for simpler messages and prototyping:

Launch notification

Additional Options

On top of setting a title and content, you can also set: