1.1.0 • Published 4 years ago

ngx-fi-moment v1.1.0

Weekly downloads
17
License
MIT
Repository
github
Last release
4 years ago

NgxFiMoment

moment as ngx-fi-moment

Installation

  • npm i moment --save
  • npm i ngx-fi-moment --save

How to use

In a module

import { NgModule } from "@angular/core";
import { NgxFiMomentModule } from "ngx-fi-moment";

@NgModule({
  imports: [NgxFiMomentModule], // for consumption within the scope of the module
  exports: [NgxFiMomentModule] // if propagation is required
})
export class SomeModule {}

Where required

import { Inject } from "@angular/core";
import { MomentDefinition, MOMENT_TOKEN } from "ngx-fi-moment";

export class SomeClass {
  constructor(@Inject(MOMENT_TOKEN) private moment: MomentDefinition) {}
}

For testing

import { NgxFiMomentModule } from "ngx-fi-moment";
import { MomentDefinition, MOMENT_TOKEN } from "ngx-fi-moment";

describe('TestingTitle', () => {
  let moment: MomentDefinition;
  beforeEach(async(() => {
      TestBed.configureTestingModule({
        imports: [NgxFiMomentModule]
      });

      moment = TestBed.get(MOMENT_TOKEN);
    }));
  }));
}));
1.1.0

4 years ago

1.0.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago