[Example] Use implementations in examples

Use implementations of custom extensions in examples.
WTD-518.
This commit is contained in:
Victor Woeltjen
2014-11-05 14:05:14 -08:00
parent b1654f7034
commit 6e59b5881d
3 changed files with 47 additions and 4 deletions

View File

@@ -6,6 +6,10 @@
"examples": [
{
"text": "I came from example/extensions"
},
{
"implementation": "SomeExample.js",
"depends": [ "exampleService" ]
}
]
}

View File

@@ -0,0 +1,31 @@
/*global define,Promise*/
/**
* Module defining SomeExample. Created by vwoeltje on 11/5/14.
*/
define(
[],
function () {
"use strict";
/**
*
* @constructor
*/
function SomeExample(exampleService, message) {
return {
getText: function () {
return [
'"',
exampleService.getMessage(),
'" and "',
message,
'"'
].join("");
}
};
}
return SomeExample;
}
);