mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-18 01:05:54 +01:00
18 lines
494 B
JavaScript
18 lines
494 B
JavaScript
'use strict';
|
|
|
|
/* Services */
|
|
|
|
|
|
// Demonstrate how to register services
|
|
// In this case it is a simple value service.
|
|
|
|
app.service('NotifyModel', function( ) {
|
|
|
|
this.showMessageSuccess = function(result) {
|
|
$('.top-right').notify({message: {text: result.message}, type: 'success',fadeOut: {enabled: true, delay: 1000}}).show();
|
|
};
|
|
|
|
this.showMessageError = function(result) {
|
|
$('.top-right').notify({message: {text: result.message}, type: 'danger'}).show();
|
|
};
|
|
}); |