Comments (7)
Have you installed the package via npm install zpl-image --save
so that your project dependencies are updated? I do not use angular but my understanding is that browserify or webpack will then use those dependencies to build a deployment bundle for angular.
from zpl-image.
I installed with npm install zpl-image --save
Used this at the top of the .ts file import * as zpl from 'zpl-image';
Getting a new error:
ERROR ReferenceError: pako is not defined
at rgbaToZ64 (vendor.js:341223)
at Object.imageToZ64 (vendor.js:341178)
from zpl-image.
I would try npm install pako --save
as well.
from zpl-image.
No change, still pako is not defined
from zpl-image.
As a workaround I copied all the functions in zpl-image.js
and pasted them in the .ts file. Removed function
and prefixed all the function calls with this.
.
Not sure why zpl-image couldn't find pako but I found that import * as pako from 'pako';
works fine, and could access pako functions inside .ts.
Working perfectly, got the ZPL output.
from zpl-image.
@patrickchoi, do you still have an example of this?
from zpl-image.
If someone is willing to provide a typescript definition file for project, I will be happy to include it.
from zpl-image.
Related Issues (9)
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 zpl-image.