From 88d444ead7e539477688b95614472dfd239d22a8 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 4 May 2015 14:46:52 -0400 Subject: [PATCH] adding short doc explanation for aw-feature directive --- .../js/shared/features/features.directive.js | 18 ++++++++++++++++++ awx/ui/static/js/shared/features/main.js | 1 + 2 files changed, 19 insertions(+) diff --git a/awx/ui/static/js/shared/features/features.directive.js b/awx/ui/static/js/shared/features/features.directive.js index a5fa6f5873..7f349cc00a 100644 --- a/awx/ui/static/js/shared/features/features.directive.js +++ b/awx/ui/static/js/shared/features/features.directive.js @@ -1,4 +1,22 @@ +/** + * @ngdoc overview + * @name features + * @scope + * @description enables/disables features based on license + * + * @ngdoc directive + * @name features.directive:awFeature + * @description The aw-feature directive works by taking in a string + * that maps to a license feature, and removes that feature from the + * DOM if it is a feature not supported by the user's license. + * For example, adding `aw-feature="system-tracking"` will enable or disable + * the system tracking button based on the license configuration on the + * /config endpoint. + * + * +*/ import featureController from 'tower/shared/features/features.controller'; + export default [ function() { return { restrict: 'A', diff --git a/awx/ui/static/js/shared/features/main.js b/awx/ui/static/js/shared/features/main.js index ad7cb50cdf..f94224864d 100644 --- a/awx/ui/static/js/shared/features/main.js +++ b/awx/ui/static/js/shared/features/main.js @@ -1,5 +1,6 @@ import awFeatureDirective from 'tower/shared/features/features.directive'; import FeaturesService from 'tower/shared/features/features.service'; + export default angular.module('features', []) .directive('awFeature', awFeatureDirective)