title: Angular directive scope does/not pass to linking function
body: <p>I'm having a problem which seems completely crazy! I use a directive that takes some attributes bound to its scope, that take a value from a parent scope variable. All very normal.. 
  ...except when I do console.log(scope), the attributes are displayed normally as scope object's properties with the expected value, but when I do console.log(scope.myAttr) then I get undefined!!</p>
  
  <p>Has anyone encountered something like this before??</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>   // In parent directive:
  
  
  scope.datepickerOptions.enableTime = false;
  
  
  
  
  // In directive:
  
  angular.module('myModule')
   .directive('datepicker', function() {
    return {
     require: 'ngModel',
     restrict : 'A',
     scope: {
      format: '@',
      enableTime: '=',
      minDate: '@',
      maxDate: '@',
      mode: '@'
     },
     link : function(scope, element, attrs, ngModel) {
      console.log("scope")
      console.log(scope)
      // displays all properties with expected values
                  //=&gt; scope.enableTime: false
  
      console.log("enableTime")
      console.log(scope.enableTime)
          // undefined (!!!)
          
          
          ...</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>   // In parent template:
  
  ...
  
  &lt;input
    type="text"
    id="events_date"
    name="events_date"
    ng-model="events.selectedDate"
    placeholder="Select Date Range"
    ng-change="setQueryDate()"
    format="d M Y"
    mode="range"
    enable-time="datepickerOptions.enableTime"
    max-date="today"
    datepicker&gt;
    
    
    ...</code></pre>
  </div>
  </div>
  </p>
  
  <p>I also tried: 
  enable-time="{{datepickerOptions.enableTime}}"  with enableTime: '@'</p>
  
  <p>and I get the same craziness when I do 
  console.log(attrs) and console.log(attrs.enableTime)</p>
  
  <p>Same thing when I put a controller with $scope argument:
  console.log($scope) displays everything normally, but console.log($scope.enableTime) gives   undefined</p>