title: can't pass dynamic parameter to angular directive
body: <p>I just took over the frontend work of our angularjs apps and I'm stuck. </p>
  
  <p>I've been creating directives to replace bloated html to make updating the frontend look easier. All was going well till I hit the voting page of our elections app.</p>
  
  <p>directive passing param (none work)</p>
  
  <pre><code> &lt;div block-container header="vm.electionToVote.name" startrow="'false'"&gt;
   &lt;div block-container header="'vm.electionToVote.name'" startrow="'false'"&gt;
   &lt;div block-container header="{{vm.electionToVote.name}}" startrow="'false'"&gt;
  </code></pre>
  
  <p>usually these work</p>
  
  <pre><code>&lt;div block-container header="'Elections List'"&gt;
  &lt;div block-container header="vm.full.title" startrow="'false'"&gt;
  </code></pre>
  
  <p>directive html <code>&lt;h3&gt;{{style.header}}&lt;/h3&gt;</code></p>
  
  <p>directive</p>
  
  <pre><code>.directive('blockContainer', blockContainer);
      /* @ngInject */
      function blockContainer() {
          var directive = {
              scope: {
                  header: '=',
                  startrow: '='
              },
              replace: true,
              transclude: true,
              controller: blockContainerCtrl,
              controllerAs: 'style',
              templateUrl: 'app/style/directives/blockContainer.tpl.html',
              restrict: 'A'
          };
          return directive;
          function blockContainerCtrl($scope) {
              //debugger;
              var vm = this;
              vm.header = $scope.header;
              vm.startrow = angular.isDefined($scope.startrow) ? $scope.startrow : 'true';
          }
      }
  </code></pre>
  
  <p>running debug shows that vm.electionToVote is undefined but ng-inspector shows that is has stuff (id, name, endDate etc) screenshot: <a href="https://i.imgur.com/d6nbAsV.png" rel="nofollow noreferrer">http://i.imgur.com/d6nbAsV.png</a> </p>
  
  <p>you can see all (including election) files here: <a href="https://plnkr.co/edit/bPVp8QY0xzlJ6aWZoRDi?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/bPVp8QY0xzlJ6aWZoRDi?p=preview</a> </p>
  
  <p>I'm really an angualjs beginner, but with google, stackoverflow and a lot of trial and error, I'm getting the job done... sort of... </p>
  
  <p>any other tips/advice would be greatly appreciated as well</p>