npm.io
1.6.1 • Published 6 months ago

ng-dangl-icons

Licence
Version
1.6.1
Deps
1
Size
16 kB
Vulns
0
Weekly
0

ng-dangl-icons

This project exports the standalone DanglIconsDirective.
By default, the base url https://icons.dangl-it.com is used. This can be configured in the DanglIconsConfigService class.

Directive Usage

The following directive selector sets the src property of the img tag to the Dangl.Icon url:

<img [diIcon]="d905bdac-dde4-47d4-aeff-ba101f4a294d">

The rectangleSize can optionally be supplied to the directive.

Configuration

The DanglIconsConfigService is used to set the global parameters for these properties:

  • rectangleSize to set the default rectangle dimensions in pixel for the generated icons if not specified on the directive itself
  • useSingleColor to only use a single color for the whole identicon
  • useMaterialColors to use Material colors, they are a bit more intensive and match better with Material design styles
  • useExtendedBlockConfigurator to allow the generation of triangles and rotated rectangles instead of only blocks

Examples

?size=128
&useSingleColor=true
&useMaterialColors=true
&useExtendedBlockConfigurator=true

?size=128
&useSingleColor=false
&useMaterialColors=true
&useExtendedBlockConfigurator=true

?size=128
&useSingleColor=true
&useMaterialColors=true
&useExtendedBlockConfigurator=false

?size=128
&useSingleColor=false
&useMaterialColors=false
&useExtendedBlockConfigurator=true