[Example] Add new example bundle

Add an example bundle containing custom extensions,
which can be recognized by extensions from another
bundle. WTD-518.
This commit is contained in:
Victor Woeltjen
2014-11-05 13:38:43 -08:00
parent 033ecec295
commit aeb670bf5f
3 changed files with 18 additions and 7 deletions

View File

@ -8,6 +8,10 @@ define(
function () {
"use strict";
var HAS_EXTENSIONS = "A directive loaded these example extensions.",
NO_EXTENSIONS = "A directive tried to load example extensions," +
" but found none.";
/**
*
* @constructor
@ -15,9 +19,9 @@ define(
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>";
HAS_EXTENSIONS : NO_EXTENSIONS;
template += "<ul>"
examples.forEach(function (e) {
template += "<li>" + e.text + "</li>";
});