Add a <time-display> component for better display of time
This commit is contained in:
parent
2ea06d3df8
commit
7d55ff9c67
3 changed files with 15 additions and 0 deletions
|
@ -0,0 +1 @@
|
||||||
|
<span>{{ ::$ctrl.datetime | amDateFormat:'dddd, MMMM Do YYYY, h:mm A' }}</span>
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Input, Component } from 'ng-metadata/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A component that displays when an event occurred.
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'timeDisplay',
|
||||||
|
templateUrl: '/static/js/directives/ui/time-display/time-display.component.html'
|
||||||
|
})
|
||||||
|
export class TimeDisplayComponent {
|
||||||
|
@Input('<') public datetime: any;
|
||||||
|
}
|
|
@ -38,6 +38,7 @@ import { ClipboardCopyDirective } from './directives/ui/clipboard-copy/clipboard
|
||||||
import { CorTabsModule } from './directives/ui/cor-tabs/cor-tabs.module';
|
import { CorTabsModule } from './directives/ui/cor-tabs/cor-tabs.module';
|
||||||
import { TriggerDescriptionComponent } from './directives/ui/trigger-description/trigger-description.component';
|
import { TriggerDescriptionComponent } from './directives/ui/trigger-description/trigger-description.component';
|
||||||
import { TimeAgoComponent } from './directives/ui/time-ago/time-ago.component';
|
import { TimeAgoComponent } from './directives/ui/time-ago/time-ago.component';
|
||||||
|
import { TimeDisplayComponent } from './directives/ui/time-display/time-display.component';
|
||||||
import { MarkdownModule } from './directives/ui/markdown/markdown.module';
|
import { MarkdownModule } from './directives/ui/markdown/markdown.module';
|
||||||
import * as Clipboard from 'clipboard';
|
import * as Clipboard from 'clipboard';
|
||||||
|
|
||||||
|
@ -81,6 +82,7 @@ import * as Clipboard from 'clipboard';
|
||||||
ClipboardCopyDirective,
|
ClipboardCopyDirective,
|
||||||
TriggerDescriptionComponent,
|
TriggerDescriptionComponent,
|
||||||
TimeAgoComponent,
|
TimeAgoComponent,
|
||||||
|
TimeDisplayComponent,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
ViewArrayImpl,
|
ViewArrayImpl,
|
||||||
|
|
Reference in a new issue