Skip to content

Commit

Permalink
Simplified README.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmester committed Aug 2, 2020
1 parent 7f94b31 commit d1a54a9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ngx-jdenticon

Angular directives that can be used to generate identicons using [Jdenticon](https://github.com/dmester/jdenticon).
Angular directives used to generate identicons using [Jdenticon](https://github.com/dmester/jdenticon).

![Sample identicons](https://jdenticon.com/hosted/github-samples.png)

Expand All @@ -12,13 +12,13 @@ Angular directives that can be used to generate identicons using [Jdenticon](htt

## Install

Add a dependency to [ngx-jdenticon](https://www.npmjs.com/package/ngx-jdenticon) NPM package.
Install the [ngx-jdenticon](https://www.npmjs.com/package/ngx-jdenticon) and [jdenticon](https://www.npmjs.com/package/jdenticon) NPM packages.

```sh
npm install --save ngx-jdenticon jdenticon
```

Let Angular know that you will be using ngx-jdenticon by importing `NgxJdenticonModule` into your `app.module.ts` (or another module).
Import `NgxJdenticonModule` into your `app.module.ts` (or another module).

```ts
import { BrowserModule } from '@angular/platform-browser';
Expand All @@ -41,8 +41,10 @@ import { AppComponent } from './app.component';
export class AppModule { }
```

Add an icon to your app. You can choose to decorate either an `<svg>` or `<canvas>` element with the `data-jdenticon-value`
or `data-jdenticon-hash` attribute.
Add an icon by decorating either an `<svg>` or `<canvas>` element with the
[`data-jdenticon-value`](https://jdenticon.com/js-api/A_data-jdenticon-value.html) or
[`data-jdenticon-hash`](https://jdenticon.com/js-api/A_data-jdenticon-hash.html)
attribute.

```html
<svg width="100" height="100" data-jdenticon-value="John Doe"></svg>
Expand Down

0 comments on commit d1a54a9

Please sign in to comment.