I am currently experimenting with using ng-src to load images from a local folder, but I keep encountering 404 errors. Can ng-src actually reference a local folder, or do you always have to use a hardcoded path like http://example.com/imgs/{{work.img}}.jpg?
The structure of my JSON data is as follows:
var works = [
{title:"XYZ", img:"portfolio_1"},
{title:"XYZ", img:"portfolio_2"},
{title:"XYZ", img:"portfolio_3"}]
function WorkListController($scope){
$scope.works = works;
}
<div class="portfolio" ng-controller="WorkListController">
<ul class="t1">
<li ng-repeat="work in works"><img ng-src='/imgs/{{work.img}}.jpg'>{{work.title}}</li>
</ul>
Thank you