I have an AngularJS project and I am trying to show an image from local folder. My folder hierarchy is like this:
--app(folder)
-----controllers(folder)
-----services(folder)
-----views(folder)
--------images(folder)
-----------image1.jpg
-----------image2.jpg
-----------image3.jpg
--------persons.html
--------departments.html
--index.html
I have in image address in personsController.js
:
$scope.fooImageAddress='images/image1.jpg';
and in person.html
:
<img ng-src="{{ fooImageAddress}}" alt="here should be an image"/>
And nothing shows, just alt
message if img
.
What can I do?
I've read this question, this and this, and tried suggestions, nevertheless there is no result.