I'm new to AngularJS and I can't fix one problem. I have value
, which stores multiple numbers. I want to use the numbers as part of URL however I don't know how to make forEach loop.
this is my code:
angular.module('eOpti.app.tasks').controller('packsController', [
'$scope', '$http', '$stateParams', 'breadcrumb',
function ($scope, $http, $stateParams, breadcrumb) {
breadcrumb.data = [{
name: 'Pakiety'
}];
$scope.renderers={
właściwości:function(value, row){
value.forEach(value, function(val){
return '<img src="http://192.168.1.215/img/task/pack/' + val + '.png" style=width:44px;margin-right:3px>';
})
}
}
}]);
I want to create val
from value
but doing something wrong.
Thank you for reply, the problem is I'm using Laravel tableHelper so I dont have standart views to use ng-src.
However I solved it in another way. Before I tried to return
URL
in wrong function and was tryingforEach
on object, what's also not correct.I solved it by splitting
value
and returnedstring
in correct function - that way: