title: AngularJS - Issues passing attributes to directive - Receive undefined value for each of them
body: <p>I´m working on a directive that receives four parameters, each of them is binded to the directive scope.</p>
  
  <p>The issue is that the directive receives all the values as undefined, the data exists, and it´s loaded. I thought about the async loading of data, but, "page" isn´t async, and it´s published in the scope from the very beginning.</p>
  
  <p>Plunker here: <a href="http://plnkr.co/edit/4NEciJZBFZOdJZqR1V6D" rel="nofollow noreferrer">http://plnkr.co/edit/4NEciJZBFZOdJZqR1V6D</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div ng-controller="myController"&gt;
      &lt;itemscounter offset="dataObject.offset" limit="dataObject.limit" total="dataObject.total" page="dataObject.page"&gt;&lt;/itemscounter&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var myApp = angular.module("myApp", []);
  
    myApp.controller("myController", function($scope){
      $scope.dataObject = {
         offset: 1,
         limit: 20,
         total: 25,
         page: 2
      }
  })
  
  myApp.directive("itemscounter", function() {
  
  return {
      restrict: "E",
      scope: {
          page: '=',
          total: '=',
          offset: '=',
          limit: '=' 
      },
      template: "&lt;div&gt;Showing products {{offset}} to {{limit}} from {{total}} (Page {{page}})&lt;/div&gt;",
      link: function (scope, element, attrs) {
  
      }
  }
  
  })
  </code></pre>
  
  <p>Any help will be very appreciated.</p>
  
  <p>Thanks so much in advance,</p>
  
  <p>Guillermo</p>