I need to create a method to compone a url, So in my class I do this:
createLink take un id and return the url:
console.log("before the method");
console.log($scope.createLink )
$scope.createLink = function createLink (id) {
var link = url+ '?idA=' + id;
return link;
};
console.log("after method ");
console.log($scope.createLink );
this is my html page:
<a ng-href="{{ createLink (file.id) }}" target="_blank" ><i
The problem is that when the console prints me the "after the method value", I doesn't read the correct value (like /user/donwlo....), but the console.log prints me the method:
function createLink (id) {
var link = urlDownloadAllegatoDettRend + '?idA=' + id;
return link;
};
lie value of $scope.createLink;
Anyone can help me to resolve this problem?