Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/451.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使两个对象相等并将此值返回到ng show_Javascript_Angularjs - Fatal编程技术网

Javascript 如何使两个对象相等并将此值返回到ng show

Javascript 如何使两个对象相等并将此值返回到ng show,javascript,angularjs,Javascript,Angularjs,我有两个对象(日期) {{vm.currentDate|date:'mediumDate'}} and {{vm.anotherDate|date:'mediumDate'}} 如何相等(如果相同)并将此操作的值发送到按钮中的指令 {{vm.currentDate|date:'mediumDate'}} and {{vm.anotherDate|date:'mediumDate'}} <button type="submit" ng-show="VALUE_FROM_OPERATIO

我有两个对象(日期)

{{vm.currentDate|date:'mediumDate'}} and {{vm.anotherDate|date:'mediumDate'}}
如何相等(如果相同)并将此操作的值发送到按钮中的指令

{{vm.currentDate|date:'mediumDate'}} and {{vm.anotherDate|date:'mediumDate'}}
<button type="submit"  ng-show="VALUE_FROM_OPERATION"></button> 

检查它们是否相等,如下所示:

{{vm.currentDate|date:'mediumDate'}} and {{vm.anotherDate|date:'mediumDate'}}
+currentDate === +anotherDate
if(+currentDate===+anotherDate){console.log('its same date dude!');}的可能重复项