terranodo/angular-search

View on GitHub
app/components/keyword/keywordDirective.js

Summary

Maintainability
A
0 mins
Test Coverage
(function() {
    angular
    .module('search_keyword_component', [])
    .directive('keyword', function keyword() {
        return {
            scope: {
                tag: '@',
                remove: '@',
                removefn: '&'
            },
            link: keywordLink,
            templateUrl: 'components/keyword/keyword.tpl.html'
        };

        function keywordLink(scope) {
            var vm = scope;
            vm.removeTag = vm.remove === 'true' ? true : false;
        }
    });
})();