Angular 2 +我有一个角度为2的外部插件,它不起作用,但当我重新加载整个页面时,它将完美地工作..我的问题是如何在不重新加载整个页面的情况下实现我的外部插件?
我将这些内容包含在我的index.html
中assets / js / plugins / responsive-tabs.js和 资产/ JS /组件/ tabs.js
这是我想要实现的代码
<ul class="nav nav-tabs" data-plugin="nav-tabs" role="tablist">
<li class="active" role="presentation"><a data-toggle="tab" href="#exampleTabsLineOne" aria-controls="exampleTabsLineOne"
role="tab" aria-expanded="true">Contact Information</a></li>
<li role="presentation" style="display: block;"><a data-toggle="tab" href="#exampleTabsLineTwo" aria-controls="exampleTabsLineTwo"
role="tab">General Information</a></li>
<li role="presentation" style="display: block;"><a data-toggle="tab" href="#exampleTabsLineThree" aria-controls="exampleTabsLineThree"
role="tab">Account Representatives</a></li>
<li role="presentation" style="display: block;"><a data-toggle="tab" href="#exampleTabsLineFour" aria-controls="exampleTabsLineFour"
role="tab">Vendor Representatives</a></li>
<li class="dropdown" role="presentation" style="display: none;">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
<span class="caret"></span> Other Details</a>
<ul class="dropdown-menu" role="menu">
<li class="" role="presentation" style="display: none;"><a data-toggle="tab" href="#exampleTabsLineOne" aria-controls="exampleTabsLineOne"
role="tab" aria-expanded="false">Contact Information</a></li>
<li role="presentation" class="" style="display: none;"><a data-toggle="tab" href="#exampleTabsLineTwo" aria-controls="exampleTabsLineTwo"
role="tab" aria-expanded="false">General Information</a></li>
<li role="presentation" class=""><a data-toggle="tab" href="#exampleTabsLineThree" aria-controls="exampleTabsLineThree"
role="tab" aria-expanded="false">Account Representatives</a></li>
<li role="presentation" class=""><a data-toggle="tab" href="#exampleTabsLineFour" aria-controls="exampleTabsLineFour"
role="tab">Vendor Representatives</a></li>
<li role="presentation" class=""><a data-toggle="tab" href="#exampleTabsLineFive" aria-controls="exampleTabsLineFive"
role="tab">Description</a></li>
<li role="presentation" class=""><a data-toggle="tab" href="#exampleTabsLineSix" aria-controls="exampleTabsLineSix"
role="tab">Routing Notes</a></li>
</ul>
</li>
<li class="nav-tabs-autoline" style="transition-duration: 0.5s, 1s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1); left: 0px; width: 81px;"></li>
</ul>