kit-moment

API

[class] KitMomentProvider

@Injectable

Provided in:'root'

Provides Moment.js instance if available.

Also you can manually inject Moment.js instance in the root module:

import * as Moment from 'moment';
import { kitMomentInstance } from '@ngx-kit/core';
...
@NgModule({
  ...
  providers: [
    {
      provide: kitMomentInstance,
      useValue: Moment,
    },

Members

SignatureDescription
get moment(): T | null

Get Moment.js instance. Returns null if not available.