mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
[Example] Use non-built-in extensions
Use non-built-in extensions in an example bundle, WTD-518.
This commit is contained in:
@ -12,9 +12,19 @@ define(
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function ExampleDirective() {
|
||||
function ExampleDirective(examples) {
|
||||
// Build up a template from example extensions
|
||||
var template = examples.length > 0 ?
|
||||
"A directive loaded these example extensions:<ul>" :
|
||||
"This came from a directive.<ul>";
|
||||
|
||||
examples.forEach(function (e) {
|
||||
template += "<li>" + e.text + "</li>";
|
||||
});
|
||||
template += "</ul>";
|
||||
|
||||
return {
|
||||
template: "And this came from a directive."
|
||||
template: template
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user