Sha256: 54165b2988575c2750901865466db8da4f2bf435551308cb3eb5e134a66572ec

Contents?: true

Size: 1.46 KB

Versions: 205

Compression:

Stored size: 1.46 KB

Contents

'use strict';

angular.module('ui.sortable.testDirectives', [])
  .directive('uiSortableSimpleTestDirective',
    function() {
      return {
        restrict: 'AE',
        scope: true,
        require: '?ngModel',
        template: '<div>Directive: <span class="itemContent" ng-bind="text"></span> !!!</div>',
        link: function(scope, element, attrs) {
          scope.$watch(attrs.ngModel, function(value) {
            scope.text = value;
          });
        }
      };
    }
  )
  .directive('uiSortableDestroyableTestDirective',
    function() {
      return {
        restrict: 'AE',
        scope: true,
        require: '?ngModel',
        template: '<div>$destroy(able) Directive: <span class="itemContent" ng-bind="text"></span> !!!</div>',
        link: function(scope, element, attrs) {
          scope.$watch(attrs.ngModel, function(value) {
            scope.text = value;
          });

          element.bind('$destroy', function() {
            element.html('');
          });
        }
      };
    }
  ).directive('uiSortableTransclusionTestDirective',
    function() {
      return {
        restrict: 'E',
        transclude: true,
        scope: true,
        template: '<div>' +
                    '<h1>Transclusion Directive</h1>' +
                    '<div>' +
                      '<div>' +
                        '<ng-transclude></ng-transclude>' +
                      '</div>' +
                    '</div>' +
                  '</div>'
      };
    }
  );

Version data entries

205 entries across 205 versions & 1 rubygems

Version Path
promethee-1.4.13 node_modules/angular-ui-sortable/test/sortable.test-directives.js
promethee-1.4.12 node_modules/angular-ui-sortable/test/sortable.test-directives.js
promethee-1.4.11 node_modules/angular-ui-sortable/test/sortable.test-directives.js
promethee-1.4.10 node_modules/angular-ui-sortable/test/sortable.test-directives.js
promethee-1.4.9 node_modules/angular-ui-sortable/test/sortable.test-directives.js