title: AngularJs directives - Need to get attribute value in templateUrl
body: <p>I need to get append directive attribute value to templateUrl.
  I tried several options however, templateUrl does not support <code>$observe</code> in it.
  Therefore I tried below and tried to get <code>"devicePath"</code> value to <code>templateUrl</code>.
  Nothing worked.
  Here is my example.</p>
  
  <pre><code>&lt;me-direct  device-path="{{contentUrl}}"  tmp-url="{{appTemplateUrl}}"&gt;&lt;/me-direct&gt;
  </code></pre>
  
  <p><strong>Directive js file</strong></p>
  
  <pre><code>angular.module('meDevices').directive('medirect',medirect);
  
      function medirect(){
          return{
              scope:{
                devicePath:'@'
  
              },
              restrict: 'E',
              controller: 'directCtrl',
              link: function(scope, element, attrs) {
                  // some ode
                  attrs.$observe('devicePath', function(value){
                      console.log(value);
                      scope.url =  value;
                      console.log(scope.url);
                  });
  
  
              },
              templateUrl: scope.url
          }
      }
  </code></pre>
  
  <p>Anyhow, this is not working since <code>scope.url</code> is not accessible from <code>templateUrl</code>. Any thoughts?? </p>
  
  <p>EDIT</p>
  
  <p>But If I send attribute as this everything will work.</p>
  
  <pre><code>&lt;me-direct  device-path="some/common/url/to/view.html"  tmp-url="{{appTemplateUrl}}"&gt;&lt;/me-direct&gt;
  </code></pre>