In my website I'm using a service that needs an url to load an image.
How can I create an URL from an image that only exists in the filesystem of the project?
EDIT
I need the url for $og_image_url of Socialshare service.
An angular have separate directive called ng-src
<img ng-src="http://www.gravatar.com/avatar/{{hash}}" alt="Description" />
or
<img ng-src="img/image.png" alt="Description" />
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.image="http://helpacoder.com/wp-content/uploads/2015/07/angular.jpeg";
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<h1>Angular</h1>
<img ng-src="{{image}}">
<h4>Or</h4>
<div ng-init="images='http://helpacoder.com/wp-content/uploads/2015/07/angular.jpeg'">
<p>Another Way </p>
<img ng-src="{{images}}"/>
</div>
</div>
Two way to display the image in angular js.
relative path?