mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 13:48:12 +00:00
[Example] Add composite services example
Add an example showing the use of composite services, WTD-518.
This commit is contained in:
27
example/composite/src/SomeOtherDecorator.js
Normal file
27
example/composite/src/SomeOtherDecorator.js
Normal file
@ -0,0 +1,27 @@
|
||||
/*global define,Promise*/
|
||||
|
||||
/**
|
||||
* Module defining SomeOtherDecorator. Created by vwoeltje on 11/5/14.
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function SomeOtherDecorator(someProvider) {
|
||||
return {
|
||||
getMessages: function () {
|
||||
return someProvider.getMessages().map(function (msg) {
|
||||
return msg + "...";
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return SomeOtherDecorator;
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user