Sha256: 72b84abbf1ad0ed69da0d26931a7bab475a8b32e65b2a3a8a7ac660bc3aa7cde
Contents?: true
Size: 991 Bytes
Versions: 248
Compression:
Stored size: 991 Bytes
Contents
/** * @ngdoc directive * @name Bastion.tasks.directive:taskInputPart * * @description * Converts part of task humanized structure into a link if possible */ angular.module('Bastion.tasks').directive('taskInputPart', function () { return { restrict: 'A', template: '<span ng-if="!link()">{{text()}}</span>' + '<a ng-if="link()" href="{{link()}}">{{text()}}</a>', scope: { data: '=' }, link: function (scope) { scope.text = function () { if (_.isString(scope.data)) { return scope.data; } return scope.data[1].text; }; scope.link = function () { if (!_.isString(scope.data) && scope.data[1]) { return scope.data[1].link; } }; } }; } );
Version data entries
248 entries across 248 versions & 1 rubygems