在html中:
<div ng-app="application" ng-controller="AppCtrl">
<form>
<input id="date-birth" class="form-control" type="date" ng-model="dateBirth">
</form>
</div>
在app.js
var application = angular.module('application', [
'ngInputDate'
]);
application.controller('AppCtrl', ['$scope', function($scope) {
$scope.dateBirth = new Date('2014','3','19');
}
]);
它显示如下错误:
Error: ngModel:datefmt
Model is not a date object
然而,它适用于角度v1.2.16。有什么想法吗?