Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

add ngPoster directive for VIDEO tag. #4408

Closed
wants to merge 1 commit into from
Closed

add ngPoster directive for VIDEO tag. #4408

wants to merge 1 commit into from

Conversation

mfo
Copy link

@mfo mfo commented Oct 14, 2013

A teeny tiny commit adding support for poster's video attribute (http://dev.w3.org/html5/spec-author-view/video.html#attr-video-poster).
<video ng-poster="{{super-poster-url}}"></video>

Thanks for this awesome front end framework :-)

@mary-poppins
Copy link

Thanks for the PR!

  • Contributor signed CLA now or in the past
    • If you just signed, leave a comment here with your real name
  • PR's commit messages follow the commit message format

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

New directive for proper poster video attr (works like ng-src).
Added doc & spec.
@petebacondarwin
Copy link
Contributor

LGTM - @mfo can you make sure you sign the CLA.

Adding documentation and unit tests was very helpful. Be aware that it would be even better if the commit message followed the rules.

@mfo
Copy link
Author

mfo commented Oct 14, 2013

I approved the CLA (Martin Fourcade) & updated the commit message (sorry, I missed this part). I hope it's ok now.

Best

@pavelnikolov
Copy link

This directive is much appreciated! I just ran into problem with poster="{{...}}" and googled for "ngPoster" directive to find this PR.

@btford
Copy link
Contributor

btford commented Oct 21, 2013

You can also just use ng-attr-poster="{{foo}}".

@mfo
Copy link
Author

mfo commented Oct 22, 2013

I was not aware of this directive (I just searched for it in the reference api but it's missing). I'll read the code of boolean attr later, but :

  • If I can safely use ng-attr-poster instead of ng-poster, my pull request would be useless.
  • I'm wondering why there are ngSrc, ngSrcset, ngHref instead of ng-attr-src, ng-attr-srcset, ng-attr-href? (same feature, different naming?)
  • ng-attr-* deserves a section in the reference api.

Let me know if you wish a better pull request.

@pavelnikolov
Copy link

Thnaks a lot for the ng-attr-* - I just learned something new!

@buunguyen
Copy link
Contributor

I believe ngSrc, ngSrcset, ngHref are "legacy" directives, existing before ng-attr-*. I really think they should be make deprecated in favor of the generic ng-attr-*.

@samuelcotterall
Copy link

I did not know about ng-attr-*. Very helpful, thank you.

@btford
Copy link
Contributor

btford commented Jun 9, 2014

@buunguyen – that wouldn't make sense. ngSrc etc need special behavior.

I'm going to close this.

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.

7 participants