0
HTML:角UI日期选择器弹出第1次后未显示
<button class="btn btn-default" ng-click="openCalendar($event)" ng-model="currentDate" ng-change="dateChanged(currentDate)" datepicker-popup
show-button-bar="false" is-open="calendarOpened">
<i class="fa fa-calendar"></i>
{{currentDate | date}}
</button>
控制器:
$scope.openCalendar = function ($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.calendarOpened = true;
};
的事情是,在$ scope.openCalendar叫就好了,但是弹出不在第一次后显示。 这就像$ scope.calendarOpened = true没有触发弹出窗口。
任何想法?我如何调试或弄清楚它为什么不起作用?
尝试使用是开放式= “$ parent.calendarOpened”,看看有没有什么帮助 – Scott 2014-09-26 17:54:31
它的工作!这是为什么? – JobaDiniz 2014-09-26 20:03:45
我不确定它是否是与范围有关的日期选择器实现中的错误,或者是以这种方式实现的。如果你四处搜寻,有几个关于它的讨论。 – Scott 2014-09-26 22:08:59