Z
Z
zasqer2014-12-09 19:42:14
Angular
zasqer, 2014-12-09 19:42:14

Is there an alternative for Foundation interchange in AngularJS?

The task is to show different pictures, depending on the resolution of the window in the browser.
Are there any "best practices" if using AngularJS?
Foundation has a great interchange feature for this. But I would like not to become attached to the Foundation.
As options, I considered:
1) Foundation Angular
pineconellc.github.io/angular-foundation/#/interchange
2) Directive for AngularJS
https://github.com/tinacious/angular-picturefill
Tips?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-12-09
@zasqer

There is a srcset attribute and a picture element. For those who do not support this kindness (and this is almost everyone now) - there is a picturefill. angular-picturefill only solves this problem for SPA (turns on the polyfill when the element appears), it still has the same picturefill inside

K
kompi, 2014-12-09
@kompi

As an alternative, if I'm not mistaken, there is a polyfill for the future html5 picture tag, which can have different pictures depending on the resolution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question