0

当我将数据选择器(角矩选择器)加载到内联花式框中后,它会输出空窗口。但是,如果我直接单击数据选择器输入-一切正常。

我使用 fancybox 作为指令:

    .directive('fancybox', function ($compile, $http) {
        return {
            scope: true,
            restrict: 'EA',

            link: function(scope, element, attrs) {
                scope.openFancybox = function (href) {
                    scope.curHosterUID = angular.fromJson(attrs.hoster);
                    //console.log(scope.chEvent);
                    //scope.curHosterUID = href.replace('#viewEvent', '');
                    console.log(scope.curHosterUID);

                    var template = angular.element(href);
                    var compiledTemplate = $compile(template);
                    compiledTemplate(scope);
                    $.fancybox.open();
                    $.fancybox.open({ href: href, type: 'inline' });

                };
            }
        };
    })
<div class="input-group" moment-picker="ctrl.timepicker" format="HH:mm:ss">
                                        <span class="input-group-addon">
                                            <i class="fa fa-clock-o"></i>
                                        </span>
                                        <input id="event_start" class="form-control"
                                               placeholder="Select a time"
                                               ng-model="ctrl.timepicker"
                                               ng-model-options="{ updateOn: 'blur' }">
                                    </div>

我如何在fancybox中强制datapicker?

4

0 回答 0