Skip to content

Commit 1b83251

Browse files
committed
Update to Angular 6
1 parent c721090 commit 1b83251

File tree

2 files changed

+29
-14
lines changed

2 files changed

+29
-14
lines changed

README.MD

+28-13
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,43 @@ export class AppModule { }
4646
```
4747

4848

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

51+
In `app.component.html`, add:
5152
```xml
5253

53-
<ngx-qrcode
54-
[qrc-value] = "value"
55-
qrc-class = "aclass"
56-
qrc-errorCorrectionLevel = "L">
57-
</ngx-qrcode>
54+
<div style="text-align:center">
55+
<h1>
56+
ngx-qrcode2 demo
57+
</h1>
58+
</div>
5859

59-
```
60-
You can also specify the QRCode version (1 to 40) explicitely
60+
<ngx-qrcode
61+
[qrc-element-type]="elementType"
62+
[qrc-value] = "value"
63+
qrc-class = "aclass"
64+
qrc-errorCorrectionLevel = "L">
65+
</ngx-qrcode>
6166

62-
```xml
67+
```
68+
In `app.component.ts`, add:
6369

64-
<ngx-qrcode
65-
qrc-element-type="url"
66-
[qrc-value] = "value"
67-
qrc-version = "40"></ngx-qrcode>
70+
```ts
71+
import { Component } from '@angular/core';
6872

73+
@Component({
74+
selector: 'app-root',
75+
templateUrl: './app.component.html',
76+
styleUrls: ['./app.component.css']
77+
})
78+
export class AppComponent {
79+
title = 'app';
80+
elementType = 'url';
81+
value = 'Techiediaries';
82+
}
6983
```
7084

85+
7186
## How to develop ngx-qrcode2?
7287

7388
To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-qrcode2",
3-
"version": "0.2.2",
3+
"version": "0.0.9",
44
"scripts": {
55
"build": "gulp build",
66
"build:watch": "gulp",

0 commit comments

Comments
 (0)