JSPM

ngx-file-icons

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 205
  • Score
    100M100P100Q81538F
  • License MIT

An angular library to display file icons according to their extension

Package Exports

  • ngx-file-icons

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngx-file-icons) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Ngx File Icons

An angular library to display file icons according to their extension based on file-icon-vectors.

Installation

Using npm:

$ npm install --save ngx-file-icons

Usage

  1. Add FileIconsModule to imports in AppModule:
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";

// NGX File Icons
import { FileIconsModule } from "ngx-file-icons";

// Components
import { AppComponent } from "./app.component";

@NgModule({
  imports: [BrowserModule, FileIconsModule],
  declarations: [AppComponent],
  bootstrap: [AppComponent],
})
export class AppModule {}
  1. Add file-icon to app.component.html:
<file-icon [set]="cla" [type]="pdf" [size]="xl"></file-icon>
  1. Define attributes in app.component.ts:
import { Component } from "@angular/core";

@Component({
  selector: "app-root",
  templateUrl: "./app.component.html",
})
export class AppComponent {
  cla = "classic";
  pdf = "pdf";
  xl = "xl";
}