Sha256: c21e18516ab65f8bcf44dbe721549e4c814c4f3b9852f0ecee698fd5aa272402
Contents?: true
Size: 1.56 KB
Versions: 176
Compression:
Stored size: 1.56 KB
Contents
/** * @ngdoc module * @name Bastion.dates * * @description * Module providing directives for formatting dates. */ angular.module('Bastion.dates', [ 'Bastion', 'react' ]); angular.module('Bastion.dates').factory('componentRegistry', ['$window', function($window) { return $window.tfm.componentRegistry; }] ); angular.module('Bastion.dates').factory('dateComponent', ['componentRegistry', function(componentRegistry) { return function(componentName) { var dateWrapper = componentRegistry.wrapperFactory().with('i18n').wrapper; return dateWrapper(componentRegistry.getComponent(componentName).type); }; }] ); angular.module('Bastion.dates').directive('date', ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) { return reactDirective(dateComponent('IsoDate'), ['date']); }] ); angular.module('Bastion.dates').directive('shortDateTime', ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) { return reactDirective(dateComponent('ShortDateTime'), ['date', 'seconds']); }] ); angular.module('Bastion.dates').directive('longDateTime', ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) { return reactDirective(dateComponent('LongDateTime'), ['date', 'seconds']); }] ); angular.module('Bastion.dates').directive('relativeDate', ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) { return reactDirective(dateComponent('RelativeDateTime'), ['date']); }] );
Version data entries
176 entries across 176 versions & 1 rubygems