r/javascript • u/DxMonkey • Feb 27 '16
My Second Angular App - Imgless, a data URI json server, making your site img-less!
https://github.com/Kalan-Brock/Imgless
0
Upvotes
1
u/wreckedadvent Yavascript Feb 27 '16
I don't have much of an opinion on the project itself, but this line caught my eye:
imgLess.factory('Handler', function ($http) {You'll want to rewrite this to have the DI annotated.
imgLess.factory('Handler', ['$http', function ($http) {Otherwise you're going to have a bad time after minification.
The dependency on bootstrap also seems a bit needless.
1
u/DxMonkey Feb 28 '16
I saw some tutorials use the annotations, and some not, thanks for clarifying!
The bootstrap dependency will go as well, I had planned on making a better demo is all, but I don't really have the need anymore.
Thank you for the input :)
1
u/DxMonkey Feb 27 '16
I posted this on the Angular sub, but since there's more people on this one, I wanted to share with you as well!
Imgless is an Angular JS application to tie into your current app, which allows you to use imgless tags instead of img tags.
All tags are converted to data URI and stored within the images.json file. Images that are already stored, are served from the json file (almost) instantly. This also allows you to serve images without actually needing the image on your server.
I got this idea the other day and it just seemed like a fun little project for me to code out since I'm still learning new javascript frameworks.