Comments (8)
looks like there was a problem packing 0.2.0... I've re-published this properly and bumped to v0.2.1. Try again -- it should work fine with angular2 -- but if you still have trouble with it after bumping to 0.2.1, i'll take a deeper look.
from ngx-barcode.
Thanks! The module is now found, but I now get this error:
"export 'Renderer2' was not found in '@angular/core'
I know that's one of the changes between Angular 2 and 4. Do you have a fix for that?
from ngx-barcode.
Thanks! The module is now found, but I now get this error:
"export 'Renderer2' was not found in ''
I know that's one of the changes between Angular 2 and 4. Do you have a fix for that?
I get the same error. What is the solution?
from ngx-barcode.
I couldn't get the module to work, so I just ended up importing the jsbarcode library directly like this:
npm install jsbarcode -S
then in the component html:
<canvas class="jsbarcode"></canvas>
then in component js I added these 4 things:
let jsbarcode = require('jsbarcode');
and
bcInit = false;
and
ngAfterViewChecked() { this.createBarcode(); }
and
createBarcode() { if (!this.bcInit) { let element = document.getElementsByClassName("jsbarcode")[0]; if (element) { jsbarcode(element, this.data.id, { format: 'CODE128' }); this.bcInit = true; } } }
Not really the best way to do it, using getElementsByClassName, but it works. Hope this helps.
from ngx-barcode.
Could not reproduce using Angular 4.2.2 and ngx-barcode 0.2.1. Everything worked out of the box as described in readme.md.
from ngx-barcode.
@mark-win - Per the title of this thread, my question was specifically for Angular 2, not Angular 4.
from ngx-barcode.
In a desire to keep this compatible with server-side rendering, and to keep close to the direction of the angular renderer, this project will keep its use of Renderer2 and require angular 4 minimum. Renderer is deprecated in favor of Renderer2, where the former will probably be removed at some point in the not-too-distant future. The angular team has kept things fairly minimal in terms of overall effort to accommodate their API changes over time, so hopefully projects can migrate up to angular 4/5+.
from ngx-barcode.
I'm looking for an ionic angular js MSI barcode scanner. Can the ngx-barcode be used for scanning MSI barcodes or only for creating MSI barcodes? Any help is greatly appreciated.
from ngx-barcode.
Related Issues (20)
- alphanumeric values not generating barcodes HOT 1
- [ngStyle]='barcodeSpecs'
- bc-element-type img cannot be used in ionic 3
- EAN => EAN13
- Error after upgrading to angular 9. Unable to run the application HOT 11
- INVITATION FOR COLLABORATORS HOT 6
- Is it possible to validate barcode ?
- How can i change Width and Height? HOT 1
- Angular 11 possible optimization bailouts HOT 1
- Error after update to Angular 11.2.4 HOT 2
- Ngx-barcode Code 128 randomly cannot read
- Is it possible to remove the hanging down bars at the end of UPC-A barcodes?
- When I am using EAN13 in the format - Showing the blank HOT 1
- Angular 12 update HOT 1
- Need to update Angular Core dependencies HOT 1
- Trying to install for Angular 12 and get an error. HOT 2
- Not working properly on Safari
- Encourage the library authors to publish an Ivy distribution. HOT 2
- Angular v17 support HOT 1
- Error after update to Angular 17.0.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-barcode.