title: unable to pass parameter to angular directive
body: <p>I want to initiate a third party control (bootstrap-select) after a collection has been assigned to a source variable. For that I am using a directive and watching a collection like this. </p>
  
  <pre><code>angular
  .module('app').directive('bootstrapDropdown', ['$timeout',
      function ($timeout) {
          return {
              restrict: 'A',
              scope: {
                  collectionName: '='
              },
              require: '?ngModel',
              link: function (scope, el, attrs) {
                  el.selectpicker();
                  scope.$watchCollection(scope.collectionName, function (newVal) {
                      $timeout(
                          function () {
                              el.selectpicker('refresh');
                          }
                      );
                  });
              }
          };
      }
  ]);
  </code></pre>
  
  <p>If I pass the name of collection as string in <code>$watchCollection</code> it works fine. But I am looking for a generic directive so I am passing name of collection like</p>
  
  <pre><code>   &lt;select bootstrap-dropdown collection-name="commandGroups"  ng-model="vm.Job.CommandGroup" name="ddlCommandGroup"&gt;
                          &lt;option value=""&gt;Select Something&lt;/option&gt;
                          &lt;option ng-repeat="cmdGroup in commandGroups" collection-name="commandGroups" value="{{cmdGroup.Id}}"&gt;{{cmdGroup.Name}}&lt;/option&gt;
                      &lt;/select&gt;
  </code></pre>
  
  <p>But it's not working</p>