title: Custom Directive, how to pass parameter to template
body: <p>Let's try this over again.  I'm creating a directive (coolDirective) that inserts a textbox.  In this directive, I am applying a second directive to the textbox that expects certain elements such as minDate.  This is just an example of what I'm looking for, the full solution is much more complicated.</p>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;cool-directive id="cool" ng-model="vm.cool min-date="vm.date" /&gt;
  </code></pre>
  
  <p>Here is my directive that changes cool-directive to a textbox:</p>
  
  <pre><code>app.directive('coolDirective', ["$compile", function ($compile) {
                return {
                    restrict: "A",
                    replace: true,
                    template: function (elem, attrs) { return "&lt;div&gt;&lt;input date-validator type=\"text\" minDate="{{minDate}}"/&gt;&lt;/div&gt;" },
                    scope: {
                        ngModel: "=",
                        minDate: "=minDate"
                    },
                    require: ["ngModel"],
                    link: function (scope, element, attrs, ctrl) {
      }
  }
  </code></pre>
  
  <p>Here is the Directive that is applied to the inserted textbox.</p>
  
  <pre><code>app.directive('dateValidator', function () {
          return {
              restrict: "E",
              scope: {
                  ngModel: "=",
                  minDate: "="
              },
              require: 'ngModel',
              link: function (scope, element, attrs, modelCtrl) {
      }
  }
  </code></pre>
  
  <p>How to I pass the angular variable mindate from HTML to Directive to Directive?  </p>