(function()
{
	angular.module('commentsModule')
		.directive('claProfileImageUrlLoader', ['profileImageUrlService', function ($service)
		{
			controller.$inject = ['$scope'];

			return {
				restrict: 'E',

				scope: {
					imageUrl: '@'
				},

				/**
				 * Controller
				 */
				controller: controller,

				template: ''
			};

			function controller ($scope)
			{
                this.$onInit = function() {
                    $service.setProfileImageUrl($scope.imageUrl);
                };
			}
		}]);
}());
