Angularjs 在UI引导的日期选择器中的日期更改时调用$scope函数,但不使用$watch
在datepicker中单击日期或月份后,不使用$watch是否可以调用函数?目前,我正在使用$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
如果是这样,请说明模板应该如何调用$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了: