From aeb670bf5f6d8a18178cc1c15cdcbb0b5340402f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 5 Nov 2014 13:38:43 -0800 Subject: [PATCH] [Example] Add new example bundle Add an example bundle containing custom extensions, which can be recognized by extensions from another bundle. WTD-518. --- example/builtins/bundle.json | 5 ----- example/builtins/src/ExampleDirective.js | 8 ++++++-- example/extensions/bundle.json | 12 ++++++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 example/extensions/bundle.json diff --git a/example/builtins/bundle.json b/example/builtins/bundle.json index 0fcbe56ce3..dae92b2f5c 100644 --- a/example/builtins/bundle.json +++ b/example/builtins/bundle.json @@ -27,11 +27,6 @@ "key": "exampleService", "implementation": "ExampleService.js" } - ], - "examples": [ - { - "text": "This is an example from example/builtins." - } ] } } \ No newline at end of file diff --git a/example/builtins/src/ExampleDirective.js b/example/builtins/src/ExampleDirective.js index d0ced99e26..5bae65ebbe 100644 --- a/example/builtins/src/ExampleDirective.js +++ b/example/builtins/src/ExampleDirective.js @@ -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: