Skip to content

Commit 8636f8f

Browse files
committed
Hide notice after 3 seconds.
1 parent bbd1e1f commit 8636f8f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

js-src/app/scripts/app.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ var jsSrcApp = angular.module('jsSrcApp', ['ngResource', '$strap', 'ui'])
4343
transclude: false,
4444
link: function(scope, element, attr) {
4545
$rootScope.$on('event:notification', function(event, message) {
46-
console.log(element);
47-
alert(message);
48-
element.html(message);
46+
element.html('<strong>' + message + '</strong>');
4947
element.show();
50-
console.log('get notification' + message);
48+
setTimeout(function() {
49+
element.html('');
50+
element.slideUp('slow');
51+
}, 3000);
5152
});
5253
}
5354
}

0 commit comments

Comments
 (0)