ritz078 / ng-embed

An AngularJS filter/directive for embedding emojis, media, maps, tweets, code and services
http://riteshkr.com/ng-embed
MIT License
122 stars 35 forks source link

hide text if only a url to an image is posted #38

Closed seiyria closed 8 years ago

seiyria commented 8 years ago

Is this possible? Basically, I want to only show the image if the string passed into ng-embed is just a link to an image. I'm not sure how/if it's possible to get what ng-embed parses out, but I imagine hiding the text would be pretty easy

seiyria commented 8 years ago

I managed to resolve this with CSS.

bettysteger commented 6 years ago

I did it like that: Hides link to file, if it is not just the link!

ng-embed > div:first-child:not(:last-child) {
  display: none;
}