Skip to content

Commit

Permalink
Update to Angular 6
Browse files Browse the repository at this point in the history
  • Loading branch information
techiediaries committed Jun 3, 2018
1 parent c721090 commit 1b83251
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
41 changes: 28 additions & 13 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,43 @@ export class AppModule { }
```


Once the library is imported, you can use the ngx-qrcode component in your Angular application:
Once the library is imported, you can use the ngx-qrcode component in your Angular application.

In `app.component.html`, add:
```xml

<ngx-qrcode
[qrc-value] = "value"
qrc-class = "aclass"
qrc-errorCorrectionLevel = "L">
</ngx-qrcode>
<div style="text-align:center">
<h1>
ngx-qrcode2 demo
</h1>
</div>

```
You can also specify the QRCode version (1 to 40) explicitely
<ngx-qrcode
[qrc-element-type]="elementType"
[qrc-value] = "value"
qrc-class = "aclass"
qrc-errorCorrectionLevel = "L">
</ngx-qrcode>

```xml
```
In `app.component.ts`, add:

<ngx-qrcode
qrc-element-type="url"
[qrc-value] = "value"
qrc-version = "40"></ngx-qrcode>
```ts
import { Component } from '@angular/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
elementType = 'url';
value = 'Techiediaries';
}
```


## How to develop ngx-qrcode2?

To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-qrcode2",
"version": "0.2.2",
"version": "0.0.9",
"scripts": {
"build": "gulp build",
"build:watch": "gulp",
Expand Down

0 comments on commit 1b83251

Please sign in to comment.