title: Can I use an API function for a directive's template URL?
body: <p>I want to load an svg file dynamically from its path in the database I used RestApi to retrieve the path and the Svg file id and display the SVG in an  widget - "Id_Leaf"file id svg:</p>
  
  <pre><code> // Get All information for LeafPlan
  
  $scope.LoadLeaf = function (Id_Leaf) {
      RESTSummoner.DoGet(PATH_LEAF, "/" + Id_Leaf).succes(function (data) {
          $scope.Leaf = data;
          console.log(data);
      }).error(function () {
  
      });
  }
  
  module.directive('svgPlan', ['$compile', 'RESTSummoner', function ($compile, RESTSummoner) {
  
      return {
          restrict: "A",
          replace: true,
          controller: function ($scope) {  
              $scope.PATH_LEAF = 'SV_MAP_LEAF';
              alert($scope.PATH_LEAF);
          },
          templateUrl:'',
          link: function (scope, element, attrs) {
              scope.PATH_LEAF = 'SV_MAP_LEAF';
              alert("coucou");
              RESTSummoner.DoGET(1).then(function (res) {
                  alert("coucou");
                  element.replaceWith(res.data)
                  console.log(res.data);
                  console.log(res.data);
              });
      }
      }
  }])
  </code></pre>