Skip to content

felixbroehl/ngx-vcard

 
 

Repository files navigation

npm version Build Status Commitizen friendly Renovate enabled codecov FOSSA Status

ngx-vcard

Almost fully RFC compliant vCard Formatter, that also can download the generated vCard. Outputs VCard version 4. Maybe other version will be supported.

If you want to have another Property, please open up an issue or even better provide a PR. ;)

Installation

  1. Install from npm

    $ npm install ngx-vcard --save
  2. Import in app.module.ts:

    import { NgxVcardModule } from 'ngx-vcard';
    
    @NgModule({
      imports: [NgxVcardModule]
    })
    export class AppModule {}

How to use

Use as Directive

Look here for a Stackblitz Example

/* example.component.ts */
import { Component } from '@angular/core';
import { VCard } from 'ngx-vcard';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  public vCard: VCard = {
    name: {
      firstNames: 'John',
      lastNames: 'Doe'
    }
  };
}
<!-- example.component.html -->
<div>
  <button id="downloadButton" [vcdDownloadVCard]="vCard">Download VCard!</button>
</div>

Use as Formatter

  • TODO: Add .ts File example

Mentions

This project is heavily inspired from the vCards-js Package from Eric J Nesser.

License

FOSSA Status

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 89.6%
  • JavaScript 7.6%
  • Dockerfile 1.7%
  • Other 1.1%