From b177c386561363dd2fb11078f8af2783c2b75c7b Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 29 Oct 2015 07:58:32 -0700 Subject: [PATCH] [Representation] Add JSDoc ...to TelemetryLinker. --- platform/representation/src/TemplateLinker.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/platform/representation/src/TemplateLinker.js b/platform/representation/src/TemplateLinker.js index 29df511427..cb4f616adb 100644 --- a/platform/representation/src/TemplateLinker.js +++ b/platform/representation/src/TemplateLinker.js @@ -27,12 +27,17 @@ define( "use strict"; /** - * Pre-fetches templates and allows them to be + * The `templateLinker` service is intended for internal use by + * the `mct-include` and `mct-representation` directives. It is + * used to support common behavior of directives; specifically, + * loading templates and inserting them into a specified element, + * and/or removing that element from the DOM when there is no + * template to populate it with. * - * @param {string[]} URLs to all templates which should be loadable * @param $http Angular's `$http` service * @param {Function} $compile Angular's `$compile` service * @param $log Angular's `$log` service + * @private */ function TemplateLinker($http, $compile, $log) { this.templateMap = {}; @@ -57,6 +62,13 @@ define( }; /** + * Populate the given element with templates, within the given scope; + * intended to support the `link` function of the supported directives. + * + * @param {Scope} scope the Angular scope to use when rendering + * templates + * @param element the jqLite-wrapped element into which templates + * should be inserted * @returns {Function} a function which can be called with a template * URL to switch templates, or `undefined` to remove. */