Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/461.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
Javascript 加载页面时默认打开bs select(角带)下拉列表_Javascript_Angularjs_Angular Strap - Fatal编程技术网

Javascript 加载页面时默认打开bs select(角带)下拉列表

Javascript 加载页面时默认打开bs select(角带)下拉列表,javascript,angularjs,angular-strap,Javascript,Angularjs,Angular Strap,我正在使用从提供的插件 加载页面时,如何默认打开下拉列表 我尝试了不同的选项,比如bs show=true,然后获取select和add click事件的Id,但似乎什么都不起作用 <span class="text-bold" id="godVar"> SLA <button type="button" class="btn btn-default btn-sm" ng-model="model" ng-

我正在使用从提供的插件

加载页面时,如何默认打开下拉列表

我尝试了不同的选项,比如bs show=true,然后获取select和add click事件的Id,但似乎什么都不起作用

<span class="text-bold" id="godVar">
            SLA
            <button type="button" class="btn btn-default btn-sm" ng-model="model"
            ng-change=""
            data-html="1" data-multiple="1" placeholder="Select SLA" bs-show="true"
            bs-options="type for type in ::filters" max-length=1 bs-select id="test">
                <span class="caret"></span>
            </button>
        </span>

$scope.test= angular.element("#test");
$scope.test.click();
使用

$timeoutfunction{ 角度。元素“测试”。触发“鼠标向下” }, 0; 此解决方案要求包含jQuery,但由于您正在使用click,因此已经包含了它

这是一个演示->