Skip to content
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

feat(api): add responsive API for img elements #384

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

ThomasBurleson
Copy link
Contributor

@ThomasBurleson ThomasBurleson commented Aug 19, 2017

  • add responsive API to img[src.md], img[src.lt-lg], img[src.gt-xs], etc.
  • skip actions if responsive keys are not defined
    • without responsive keys (src.<alias>) defined, the ImgSrcDirective should fall-through and not change any attributes or properties on the img DOM element. The img.src attribute is dynamically set only when responsive keys are defined.
    • defaults to src="" if not explicitly assigned
    • responsive key activation will then assign the activated value to img.src attribute.

Closes #366, Fixes #81, Fixes #376.

@ThomasBurleson ThomasBurleson added this to the v2.0.0-beta.9 milestone Aug 19, 2017
@ThomasBurleson ThomasBurleson changed the title fix(img-src): skip actions if no responsive keys are defined fix(img-src): skip actions if responsive keys are not defined Aug 19, 2017
@ThomasBurleson ThomasBurleson force-pushed the thomas/fix-img-src branch 2 times, most recently from 6d82622 to 3c00609 Compare August 24, 2017 16:53
@ThomasBurleson ThomasBurleson changed the title fix(img-src): skip actions if responsive keys are not defined feat(api): add responsive API for img elements Aug 24, 2017
@ThomasBurleson ThomasBurleson modified the milestones: v2.0.0-beta.9, v2.0.0-beta.10 Aug 28, 2017
* add responsive API to img[src.md], img[src.lt-lg], img[src.gt-xs], etc.
* skip actions if responsive keys are not defined
  *  without responsive keys (`src.<alias>`) defined, the ImgSrcDirective should **fall-through** and not change any attributes or properties on the `img` DOM element. The `img.src` attribute is dynamically set only when responsive keys are defined.
    * defaults to `src=""` if not explicitly assigned
    * responsive key activation will then assign the activated value to `img.src` attribute.

Closes #366, Fixes #81, Fixes #376.
@ThomasBurleson
Copy link
Contributor Author

@jelbourn - previous issues where <img src=""> would create an instance of the ImgSrcDirective have been fixed. Ready for presubmit.

@tinayuangao tinayuangao merged commit 354f54f into master Sep 7, 2017
@ThomasBurleson ThomasBurleson deleted the thomas/fix-img-src branch September 13, 2017 22:12
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImgSrcsetDirective - Support Responsive src API add new API fxSrc for responsive features Image element
3 participants