Git Product home page Git Product logo

angular-placeholders's People

Contributors

joshdmiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-placeholders's Issues

Error when img tags are generated dynamically?

Hi again, see plnkr for more details.
you need to inspect with chrome developer tools to see error it appears as many time as the number of images:

TypeError: Cannot call method 'match' of undefined
at Object.fn (http://run.plnkr.co/plunks/we0YGl9VQ2gCai3try8p/angular-placeholders.img.js:54:40)
at Object.e.$digest (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js:84:307)
at Object.e.$apply (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js:86:376)
at e (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js:92:400)
at n (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js:95:472)
at XMLHttpRequest.q.onreadystatechange (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js:96:380) angular.min.js:60
(anonymous function)

image showing the error:
Untitled

Thanks in advance.

img: Dynamic sizes

How about being able to dynamically specify a size? e.g. 100% or 75% and base it on the width of the parent element.

Names are too long!

Seriously, I use placeholders to be quick, short, and painless. The directive (and namespace) is

HUGE

Any thought as to just using a ph- prefix? Otherwise fairly awesome ๐Ÿ‘

Suggested directive contractions:

  • ph-img="24x24"
  • ph-text="{{numSentences}}x{{numPara}}"

No reason to have multiple attributes ๐Ÿ˜„

img: Font Size is not Recomputed on Resize

When the phImg is updated dynamically, the image is resized accordingly but the font size is not recalculated, leaving it either too big or too small.

Update: It's recalculated when the width changes, but not when the height changes.

img: Support non-img tags

Right now, the directive assumes the element is an <img>, but doesn't check. We check for this.

In addition, when the element is not an <img>, phImg should set the placeholder as the element's CSS background-image, so it can be used on any type of element.

Could you please use MIT licensing?

Hi, your project is very helpful, and my company would like to use it, however it would get through legal much faster if it had MIT licensing. There is any possibility you could do that it would help us out.

txt: Shorten & Combine Attributes

As pointed out in #1 by @ProLoser, numSentences and numParagraphs are far too cumbersome to type. The attributes should have a short, combined syntax. The directive itself (phTxt) will received the new value, which will allow join specification of both sentences and paragraphs. Examples:

  • 5s5p: prints 5 paragraphs of five sentences each. Ordering does not matter.
  • 5s: prints 5 sentences, no paragraphs.
  • 5p: prints 5 paragraphs, each with a random numer of sentences.
  • Empty: prints a random number of paragraphs, each with a random number of sentences.

bower registration

hi, I'm registering this in the bower registry, so it will be available for install like this:

bower install angular-placeholders 

Thanks.

Custom placeholder text for phImg

How about adding an optional attribute to the phImg directive (perhaps ph-text?) that adds custom placeholder text to the image, e.g.:

screen shot 2013-11-05 at 16 56 43

Please create tagged release?

Great library! For easier use with the Play Framework, I've implemented the build configuration to wrap your library in a "WebJar" (see webjars.org if you're not familiar with them).

Here's the wrapper configuration I wrote: https://github.com/metasim/angular-placeholders-webjar

I've submitted it to the webjars.org organization (see webjars/webjars#1079) and the feedback I've gotten is that they prefer to have the build configured against a github "tagged release" (eg: https://github.com/joshdmiller/angular-placeholders/releases) rather than a free floating or SHA-based one.

Would you be willing to do this? I could just fork the repo and create my own tagged release, but I'd rather not diverge from any future work you do on the library.

Thank you!

Bower version not properly installed

When installed using bower install angular-placeholders the files are downloaded into the right place (e.g. /app/bower_components/angular-placeholders) but they are not properly loaded/inserted in the index.html. The reason for this is, that the final script files must reside in the module's root directory (see above) and not in some subdirectory like src/img/img.js. Afaik that's a well known problem in the bower ecosystem.

Support default configuration

Things like default image colors and default # of sentences and paragraphs should be globally configurable. Perhaps some constants: phTxtConfig and phImgConfig.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.