datepicker angularJs不会出现在我的页面中

时间:2017-09-17 11:11:06

标签: angularjs

我尝试在页面中插入以下代码:

<md-datepicker ng-model="ctrl.myDate" md-placeholder="Enter date"></md-datepicker>

myDate在控制器中正确显示,但它不会出现在该字段的页面中: date

更新:

<form ng-submit="save()" class="form" role="form">
  <div class="col-md-2" id="dateContainer">
    <div class="form-group">
      <label for="dataCreazione">Data creazione</label>
      <md-datepicker ng-model="dataCreation" class="classDate" md-placeholder="Enter date">
      </md-datepicker>
    </div>
  </div>
  <button type="submit" class="btn btn-default btn-lg">Save</button>
</form>

控制器包含:

var $scope.dataCreation = new Date();
$scope.save = function() {
  console.log("the date of creation = " + $scope.dataCreation);
}

0 个答案:

没有答案