title: using datepicker on selecting date value not binding to model Angular js
body: <p>i am using datepicker but here facing problem regarding model value not binding to model when i select date its nothing happen, any one can tell me where i am doing wrong must be appreciated. here i am sending my code.Showing date picker just problem after selecting date value not not binding to ng-model="user.dob".</p>
  
  <p>signUpview.html</p>
  
  <pre><code>&lt;div class="col-md-6"&gt;
  &lt;label for="datepicker" class="col-lg-5 form-label"&gt;Date Of Birth:&lt;/label&gt;
      &lt;div class="col-lg-7"&gt;
   &lt;input type="text" class="form-control dateBirth" ng-model="user.dob" id="datepicker" name="datepicker" datepicker placeholder="Date Of Birth" required/&gt;
   &lt;div class="error" ng-show="newUser_form.datepicker.$dirty &amp;&amp; newUser_form.datepicker.$invalid"&gt;
   &lt;small class="error errorFields" ng-show="newUser_form.datepicker.$error.required"&gt; Date is required.&lt;/small&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>datepickerDirective.js</p>
  
  <pre><code>app.directive('datepicker', function() {
      var linker = function(scope, element, attrs) {
          element.datepicker().on('changeDate', function(){
              console.log(scope);
  
              $(".datepicker").hide();
          });
      }
      return {
          require: 'ngModel',
          restrict: 'A',
          link: linker
      }
  });
  </code></pre>