date-formater-test
v0.0.4
Published
Angular library package for a reusable date-related component.
Readme
My Date Lib
Angular library package for a reusable date-related component.
Installation
Install the package in your Angular application:
npm install my-date-libAngular Compatibility
This package is built for Angular 20 and expects these peer dependencies:
{
"@angular/common": "^20.3.0",
"@angular/core": "^20.3.0"
}Usage
Import MyDateLib in a standalone Angular component:
import { Component } from '@angular/core';
import { MyDateLib } from 'my-date-lib';
@Component({
selector: 'app-root',
standalone: true,
imports: [MyDateLib],
template: `
<lib-my-date-lib></lib-my-date-lib>
`,
})
export class AppComponent {}You can also create an instance and use the available method:
import { MyDateLib } from 'my-date-lib';
const dateLib = new MyDateLib();
const message = dateLib.sampleResponse('Angular');
console.log(message); // Hello AngularAPI
Component
MyDateLib
Selector:
<lib-my-date-lib></lib-my-date-lib>Methods
sampleResponse(name: string): string
Returns a greeting message for the provided name.
sampleResponse('Angular'); // Hello AngularBuild
Build the library from the workspace root:
ng build my-date-libThe compiled package is created in:
dist/my-date-libPublish
After building, publish from the compiled package directory:
cd dist/my-date-lib
npm publishLicense
MIT
