title: Reset scope variable in directive after controller and postLink initialize;
body: <p>I create the simple directive:</p>
  
  <pre><code>angular.module('app').directive('field', function () {
      return {
          restrict: 'E',
          template: '&lt;div ng-click="clickElement()"&gt;&lt;input id="{{inputId}}"&gt;&lt;/div&gt;',
          scope: {
              inputId: '@'
          },
          controller: function ($scope) {
  
              if (!$scope.inputId) {
                  $scope.inputId = 'abc';
              }
  
              function logId() {
                  console.log($scope.inputId); // 'abc'
                  console.log($scope); //$scope.inputId is undefined here (!!!)
              }
  
              logId();
  
              $scope.clickElement = function() {
                  //$scope.inputId is undefined here
              }
          }
      }
  });
  </code></pre>
  
  <p>Then I use it without <code>inputId</code> field like this:</p>
  
  <pre><code>&lt;field&gt;&lt;/field&gt;
  </code></pre>
  
  <p>When I use directive my $scope.inputId is undefined but not 'abc' as I want.
  Why? What can I do to get 'abc' if inputId not specified in directive usage?</p>
  
  <p>P.S. The same situation when the code in <code>postLink</code> function.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Plank: <a href="http://plnkr.co/edit/0mpcbrdUdafCMzATmCYZ?p=preview" rel="nofollow">http://plnkr.co/edit/0mpcbrdUdafCMzATmCYZ?p=preview</a></p>
  
  <p>Ugly workaround (to show how it must work): <a href="http://plnkr.co/edit/G6gxQhgrteJBeNmR7yTX?p=preview" rel="nofollow">http://plnkr.co/edit/G6gxQhgrteJBeNmR7yTX?p=preview</a></p>