c0bra / angular-responsive-images Goto Github PK
View Code? Open in Web Editor NEWAngular responsive images
Home Page: http://c0bra.github.io/angular-responsive-images/
Angular responsive images
Home Page: http://c0bra.github.io/angular-responsive-images/
So, the ng-
prefix is actually Angular's own vendor prefix for directives, and their recommendation is for everybody to come up with their own.
Just looking at this directive for adoption in a project and figured I'd throw it out there as a suggestion.
When I download angular-responsive-images-master
and extract it I see I have all these files:
~/Desktop/angular-responsive-images-master$ tree
.
├── bower.json
├── Gruntfile.js
├── package.json
├── README.md
├── src
│ └── ng-responsive-images.js
└── test
├── config
│ └── karma.conf.js
├── lib
│ ├── angular.js
│ └── angular-mocks.js
└── unit
└── ng-responsive-images.spec.js
How do I begin using it? Should I just drop ng-responsive-images.js
in my AngularJS app's scripts
folder and include it along with AngularJS in my index.html
file? Or is there more complicated configuring that needs to be done?
Could be creating leaks otherwise.
More of a question.
What is the cross browser compatibility? I love it so far, but I am not able to check it in IE9 at the moment.
Also, can I drop in Angular syntax?
bh-src-responsive="[ [ '(min-width: 960px)', '{{image.url}}' ], [ '(min-width: 1700px)', '{{image.url}}' ] ]"
Is there a way to swap responsive image sets on route change?
Would be helpful if there is as I am working on a project that could use this badly.
If you load the page in a size not matching any media queries used in the bg-src-responsive directive, then resize up to a matched size (so the image swaps out), and then reduce the size so that no media queries are matched, the image remains at the last matched media query rather than going back to initial src value.
Not sure if this is a "feature" but I would assume that it should return to the original source as none of the media queries are matched.
Hi there, we had our bower.json definition set to use "~0.0.4" and so when newer versions were pushed today, our builds started to fail. Our builds have been using "bower_components/angular-responsive-images/src/bh-responsive-images.js" however with the newer version (could have been with 0.0.5 or 0.0.6), this appears to have been changed to "bower_components/angular-responsive-images/js/bh-responsive-images.js".
To remedy this, we locked our version down to only use "0.0.4". The semver system otherwise believes a micro change to be non-breaking, whereas this directory change was breaking. Bumping to version "0.1.0" I believe would have identified this appropriately within the semver system and avoided build failures.
Was this directory change intended? We will likely upgrade our version of your library eventually and so wonder whether we should make a change to point to this new directory.
Thank you!
Nicholas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.