0
我想显示json对象中所有字段的值。我能够在对象中添加名字,电子邮件,密码。但是我的确认密码不显示在对象中为什么?我输入相同的密码以确认密码仍然没有显示如何在角js中显示json合成器中的对象?
这里是我的代码
http://plnkr.co/edit/iHA8iQC1HM5OzZyIg4p3?p=preview
angular.module('app', ['ionic','ngMessages']).directive('compareTo',function(){
return {
require: "ngModel",
scope: {
otherModelValue: "=compareTo"
},
link: function(scope, element, attributes, ngModel) {
ngModel.$validators.compareTo = function(modelValue) {
// alert(modelValue == scope.otherModelValue)
return modelValue == scope.otherModelValue;
};
scope.$watch("otherModelValue", function() {
ngModel.$validate();
});
}
};
为什么确认密码不显示?
}).controller('first',function($scope){
})