Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.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 在UI引导的日期选择器中的日期更改时调用$scope函数,但不使用$watch_Angularjs_Datepicker_Angular Ui Bootstrap - Fatal编程技术网

Angularjs 在UI引导的日期选择器中的日期更改时调用$scope函数,但不使用$watch

Angularjs 在UI引导的日期选择器中的日期更改时调用$scope函数,但不使用$watch,angularjs,datepicker,angular-ui-bootstrap,Angularjs,Datepicker,Angular Ui Bootstrap,在datepicker中单击日期或月份后,不使用$watch是否可以调用函数?目前,我正在使用$watch监视日期的变化以触发任务 如果是这样,请说明模板应该如何调用$scope函数?接受建议 <p class="input-group" style="padding-top:5px;"> <input type="text" uib-datepicker-popup="dd/MM/yyyy" style="width:165px; height:34px;" ng-c

在datepicker中单击日期或月份后,不使用$watch是否可以调用函数?目前,我正在使用$watch监视日期的变化以触发任务


如果是这样,请说明模板应该如何调用$scope函数?

接受建议

<p class="input-group" style="padding-top:5px;">
    <input type="text" uib-datepicker-popup="dd/MM/yyyy" style="width:165px; height:34px;" ng-change="changefun();" class="form-control" ng-model="myDate" is-open="isOpened" " datepicker-options="Options" calendarWeeks="false" close-text="Close" required/>
    <span class="input-group-btn" style="float:left">
      <button style="height:34px; padding-right:0;" type="button" ng-click="Open()" class="btn btn-default">
        <img border="0" src="/_layouts/15/images/calendar_25.gif?rev=23" />
      </button>
    </span>
</p>

有关更多详细信息,请参阅。更改应该有效。好的,我会尝试。谢谢成功了!我现在可以摆脱$watch了: