Adding in an outline of a front-end for retrieving messages from the backend api.
This commit is contained in:
parent
df4e58f3e4
commit
1dbd27934f
3 changed files with 23 additions and 0 deletions
17
static/js/directives/quay-message-bar.js
Normal file
17
static/js/directives/quay-message-bar.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* An element which displays a message for users to read.
|
||||
*/
|
||||
angular.module('quay').directive('quayMessageBar', function () {
|
||||
return {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/quay-message-bar.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function ($scope, $element, ApiService) {
|
||||
$scope.messages = [];
|
||||
// ApiService.getMessages().then(function(data){ $scope.messages = data['messages'] || []; });
|
||||
}
|
||||
};
|
||||
});
|
Reference in a new issue