【发布时间】:2015-12-22 17:56:59
【问题描述】:
我不确定我的日期格式有什么问题。
我收到以下错误:
错误:[ngModel:nonassign] http://errors.angularjs.org/1.3.7/ngModel/nonassign?
profile-edit.html
<input id="birthday" type="date" class="form-control" ng-model="account.birthday | date" datepicker-options="dateOptions" close-text="Close" />
后端帐户实体:
@Entity
@Table(name = "account")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Account extends BaseEntity implements Serializable {
....
@Column(name = "BIRTHDAY")
private Date birthday;
}
在从后端获取帐户后,调试器中的 account.birthday 字段似乎以纯字符串形式保存毫秒数。
直接来自调试器:
活跃:真 生日:241912800000 城市:“埃森” 国家:“德国” 创建:1450289294000
我该如何解决这个问题?
【问题讨论】:
标签: angularjs