title: AngularJS - Why is my directive isolated scope variable is undefined?
body: <p>I have the following plunker:</p>
  
  <p><a href="http://plnkr.co/edit/7YUpQ1tEjnUaX01txFcK?p=preview">http://plnkr.co/edit/7YUpQ1tEjnUaX01txFcK?p=preview</a></p>
  
  <p>When I run this, templateUrl is undefined in the scope.  Why?</p>
  
  <p>My assumption here is that it's trying to find a variable named template.html in the parent scope, but can't, so it's assigning it to undefined.  If so, how do I pass this in as a string instead of a scope variable?</p>
  
  <p>Html:</p>
  
  <pre><code>&lt;body ng-app="myApp"&gt;  
     &lt;div ng-controller="TestCtrl"&gt;
        &lt;test-directive ng-model="testModel" 
                        template-url="template.html"&gt;
        &lt;/test-directive&gt;
     &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>.js</p>
  
  <pre><code>var app = angular.module("myApp", []);
  
  app.controller("TestCtrl", function($scope) {
    $scope.testModel = {}
  });
  
  app.directive("testDirective", function () {
      return {
          restrict: 'E',
          scope: {
              model: "=ngModel",
              templateUrl: "="
          },
          template: "&lt;div ng-include='templateUrl'&gt;&lt;/div&gt;",
          link: function (scope, element, attrs) {
             console.log(scope.templateUrl);  // &lt;-- Shows as undefined
          }
      }
  });
  </code></pre>