1

I have some angular snippet which looks like:

<span ng-if="someproperty.x > 53" 
   ng-click="Call_foobar(user.b)"> class="fa fa-envelope-o pointer" 
  <md-tooltip md-direction="bottom">
     Some tooltip
  </span>

I have one small icon I would like to use that I downloaded over the web (say icon.png stored in the same directory) instead of the icon being used here class="fa fa-envelope-o pointer". How can I embed my icon? I tried using something similar to ng src =/pathtoimg/ but that does not seem to work. Online examples are more specific to some packages/classes. Can someone please help me out here?

georgeawg
  • 48,608
  • 13
  • 72
  • 95
elevenmac
  • 23
  • 4
  • Use an `img` tag with `src` pointing to the path of the icon you want within the span. Then position it however you want with css. – bamtheboozle Nov 29 '17 at 18:03
  • This is a CSS question. Use the `content` property of either the [::before](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) or [::after](https://developer.mozilla.org/en-US/docs/Web/CSS/) pseudo-elements. For more information, see [MDN CSS Reference - `content` property](https://developer.mozilla.org/en-US/docs/Web/CSS/content). – georgeawg Nov 29 '17 at 22:29

0 Answers0