Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.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
Angularjs ng更改不适用于新日期()对象_Angularjs_Angular Strap - Fatal编程技术网

Angularjs ng更改不适用于新日期()对象

Angularjs ng更改不适用于新日期()对象,angularjs,angular-strap,Angularjs,Angular Strap,这是我的密码 <input class="form-control" ng-model="a.newTimes[$index]['time']._dateProxy" ng-change="updateProviderComment(a)" bs-timepicker type="text"> a、 newTimes[$index]['time'].\u dateProxy是一个新的Date()对象 要点是:函数updateProviderComment仅在第一次运行时,即更改

这是我的密码

<input
class="form-control"
ng-model="a.newTimes[$index]['time']._dateProxy"
ng-change="updateProviderComment(a)"
bs-timepicker
type="text">

a、 newTimes[$index]['time'].\u dateProxy是一个新的Date()对象

要点是:函数updateProviderComment仅在第一次运行时,即更改时间
缺陷如何修复?

我发现角带模块存在很多问题,我可以建议您使用用于计时器选择器的角ui模块吗?我用这个模块在我的应用程序中做了一些类似于你的选择器的事情,一切都很顺利。看一看

@mautrok是的,我完全同意你的观点-角度ui更好(可能只是现在)。但关于项目中的设计,我们有带有html内容的popover,我不能用AngularUI实现这一点。我尝试重新定义popover模板并在内部使用ng include,如下所示:

angular.module("template/popover/popover.html", []).run(["$templateCache", function($templateCache){
    $templateCache.put("template/popover/popover.html", ""
        +"<div class=\"popover popover-appointment {{placement}}\" ng-class=\"{ in: isOpen(), fade: animation() }\">"
        +"<div class=\"arrow\"></div>"
        +"<div class=\"popover-inner\">"
        +"<h3 class=\"popover-title\" ng-bind=\"title\" ng-show=\"title\"></h3>"
        +"<div class=\"popover-content\" ng-controller=\"AppointmentPopoverController\" ng-include src=\"content\"></div>"
        +"</div>"
        +"</div>"
        +"");
}]);
angular.module(“template/popover/popover.html”,[])。运行([“$templateCache”,函数($templateCache){
$templateCache.put(“template/popover/popoover.html”
+""
+""
+""
+""
+""
+""
+""
+"");
}]);
它可以工作,但当popover重新打开javascript绑定时,它就消失了