我在angularjs 1.4中使用monaco-editor,我已经在选项卡中实现了monaco-editor,其中2(installScript和unInstallScript)数据是静态的,其他(服务和editableFiles)数据来自数组。在页面加载期间,内容将被扩展为能够读取同一页面中的其他选项卡内容详细信息,如图所示。单击选项卡后,它不会展开
<div class="padding-10">
<ul id="installUnTabs" class="nav nav-tabs bordered">
<li>
<a id="installScripttab" href="#installScript" data-toggle="tab">
<i class="fa fa-fw fa-lg fa-file"></i> install Script
</a>
</li>
<li>
<a id="unInstallScripttab" href="#unInstallScript" data-toggle="tab">
<i class="fa fa-fw fa-lg fa-file"></i> UnInstall Script
</a>
</li>
<li ng-repeat="s in services track by $index">
<a id="s{{$index}}tab" href="#s{{$index}}" data-toggle="tab">
<i class="fa fa-fw fa-lg fa-file"></i> {{s}}
</a>
</li>
<li ng-repeat="a in editableFiles track by $index">
<a id="a{{$index}}tab" href="#a{{$index}}" data-toggle="tab">
<i class="fa fa-fw fa-lg fa-file"></i> {{a}}
</a>
</li>
</ul>
<!--content-->
<div id="installUnTabsContent" class="tab-content padding-10">
<div class="tab-pane active" id="installScript">
<div style="height:500px;width: 100%;">
<div id="installScriptedit" style="height:100%;width: 100%"></div>
</div>
</div>
<div class="tab-pane active" id="unInstallScript">
<div style="height:500px;width: 100%;">
<div id="unInstallScriptedit" style="height:100%;width: 100%"></div>
</div>
</div>
<div class="tab-pane active" id="s{{$index}}" ng-repeat="s in services track by $index">
<div style="height:500px;width: 100%;">
<div id="{{ s }}" style="height:100%;width: 100%"></div>
</div>
</div>
<div class="tab-pane active" id="a{{$index}}" ng-repeat="a in editableFiles track by $index">
<div style="height:500px;width: 100%;">
<div id="{{ a }}" style="height:100%;width: 100%"></div>
</div>
</div>
</div>
</div>
在Controller中,我已经给出了此信息,因此它将在页面加载期间选择,但无法正常工作,请帮助我解决此问题 $('#installScripttab')。click();