-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use this in AngularJS #19
Comments
Yes, that should definitely be possible. My theory is that bower doesn't look at the "main" configuration from package.json, since it's npm/yarn specific. But that would mean you'd have to import from the |
"that should definitely be possible" ... -____- for your information: other plugins i've installed that way, are working well. i dont think that bower is the problem. and i can't use "import" because its the wrong ES-Version. Here my question in an other way: How can i "import" this into an AngularJs controller? |
No need to be snark.
How do you import other modules? |
They are automatically imported by bower and usable out of the box without any "import-command". But unfortunately, that "auto-import" does not work with your plugin and it's not getting listed in the index.html as an imported script like others do. |
It's been a few years since I last looked at Bower, but looking at their docs it seems like you must have an additional build step. See "Use Packages" https://bower.io/#use-packages |
yes, that the way the bower-components get automatically imported: i've added |
This snippet doesn't import anything else than jQuery: You would need to add something like this: Verify the correct path by looking in your |
... i know ... it's just the example from bower.io |
It may be that Bower doesn't know which file to use, because we don't have a Bower configuration in zipcelx. I'd err on the side of not adding that config, since Bower is practically deprecated. That doesn't mean you cannot use zipcelx, but you have to figure out how to get it into your build pipeline. As much as I'd like to help, I cannot because I don't have the information about your build pipeline that's necessary to help. If you're using gulp, as you're indicating, you can add it to your build steps in your gulp configuration. |
Do you have a built version of the script anywhere? lib/zipxelx.js imports several dependencies, so it cannot be simply imported into HTML like you say. |
Good point @PixelCrux. We don’t, but I’ll fix that tomorrow. |
@PixelCrux @Sadi-1992 Forgot to mention here, but there's a |
The script seems to have a bug. I tested in this Codepen: https://codepen.io/KingDragonhoff/pen/ddEXrv |
@PixelCrux That's not a very good bug description. In the future it'd be helpful to provide more info. With this regard I simply took at look at the console after clicking Download XLSX button. Give that a try yourself. |
Sorry, I figured you would be able to go to the Codepen and check your browser's console to see for yourself what error was occurring, but I'll try my best to describe it for you anyway. Visibly, nothing happens. When attempting to convert, the following exception occurs at line 1, column 151472: Uncaught TypeError: Cannot create property 'type' on number '1'. It points to this in the code: |
I got an error from our lib in the console, because your data is invalid |
Ah, I see. It looks to be working now. Thank you for this! |
Thank you. Especially for continuing to be active. Your issue helped me make a better build pipeline and support more use cases ❤️ |
You're welcome! Now, do you think it would be possible to make this work on iOS? Right now, it almost works, but the Blob it gives the option to download is just the plain Zip file, "unknown.zip." Any ideas how to tell Safari that this is an XLSX file? |
Hmm. That's an interesting question. iOS is a big peculiar with regards to file handling. Did you provide a filename, and it works properly on desktop? |
Yes, it works brilliantly on desktop and uses the file name I specify. |
Let's move converstation to #22 |
I'm trying to use your library in my AngularJS project but i'm always getting the same Error:
I cant use
import zipcelx from 'zipcelx';
and have to install the lib using bower. ("zipcelx": "git://github.com/egeriis/zipcelx.git#1.2.0")is there a way to "import" this into my project?
The text was updated successfully, but these errors were encountered: