This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.6.
npm install cccd-chip-sdkThis library was generated with Angular CLI version 10.1.6.
Run ng generate component component-name --project tpb-sdk-for-vms to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project tpb-sdk-for-vms.
> Note: Don't forget to add --project tpb-sdk-for-vms or else it will be added to the default project in your angular.json file.
Run ng build tpb-sdk-for-vms to build the project. The build artifacts will be stored in the dist/ directory.
After building your library with ng build tpb-sdk-for-vms, go to the dist folder cd dist/tpb-sdk-for-vms and run npm publish.
Cách dùng thư viện
> npm install cccd-chip-sdk
Import thư viện
> import {CardChipScanService} from "cccd-chip-sdk";
Sử dụng thư viện trong angular
````
constructor(private cardChipService: CardChipScanService) {
this.cardChipService.connect("10.2.148.149");
this.getMessage();
}
getMessage(){
this.cardChipService.onDataReceived().subscribe((data) => {
console.log('Có dữ liệu mới:', data);
this.message = data
if(data !== 'ERROR_CONNECT') {
this.callAPICard(data)
}else {
console.log('error connect to device')
}
});
}