4

I have an image shown below and I want to make it into a button where you can download files. I have seen examples on how to download such as Angularjs simple file download but this didn't work for me.

<li ng-init="imgsrc_local='../img/local.png'"></li>
Community
  • 1
  • 1
ML.
  • 589
  • 1
  • 9
  • 33

2 Answers2

4

Try to use button tag and an img with ng-src pointing out to your image path, like this:

<button><img ng-src="../img/local.png"/></button>
Han Arantes
  • 775
  • 1
  • 7
  • 19
0

Use md-button and md-icon using angular material

<md-button class="md-fab">
    <md-icon md-svg-src="path"></md-icon>
</md-button>

To use this you have to add angular_material.js script to your html You can install it using bower command

bower install angular-material

Then add this to your html file

<script src="bower_components/angular-material/angular-material.js"></script> 
Antony Joslin
  • 309
  • 4
  • 17