Remove Link to Blog in QE + Refactor quayRequire Directive (#2523)

* refactoring quayRequire directive

* added tests, show element if input changes

* use ngIfDirective in QuayRequireDirective
This commit is contained in:
Alec Merdler 2017-04-10 11:57:09 -07:00 committed by GitHub
parent f0b3308131
commit 32843e4f22
6 changed files with 104 additions and 20 deletions

View file

@ -2,20 +2,6 @@
* Directives which show, hide, include or otherwise mutate the DOM based on Features and Config.
*/
/**
* Adds a quay-require attribute includes an element in the DOM iff the features specified are true.
*/
angular.module('quay').directive('quayRequire', function ($animate, Features, AngularHelper) {
return {
transclude: 'element',
priority: 600,
terminal: true,
restrict: 'A',
link: AngularHelper.buildConditionalLinker($animate, 'quayRequire', function(value) {
return Features.matchesFeatures(value);
})
};
});
/**
* Adds a quay-show attribute that shows the element only if the attribute evaluates to true.