【发布时间】:2019-03-17 07:22:56
【问题描述】:
我正在尝试将 bootstrap-select 添加到我的一个项目中,当应用程序加载并且手动点击 URL 时它显示正常,但是当我使用路由切换到另一个页面时,选择消失了。
After I switch the page and return to the same page
我的 app.module.ts 是这样的:
@NgModule({
declarations: [
AppComponent,
HeaderComponent,
SearchComponent,
VehiclesComponent,
VehicleDetailComponent,
VehicleEditComponent,
VehicleListComponent,
VehicleItemComponent,
AuthComponent,
SigninComponent,
SignupComponent,
MiniSearchComponent,
AdvancedSearchComponent,
FooterComponent
],
imports: [
BrowserModule,
FormsModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
angular.json 文件
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/bootstrap-select/dist/css/bootstrap-select.min.css",
"src/styles.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/popper.js/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/bootstrap-select/dist/js/bootstrap-select.min.js"
]
我正在使用<router-outlet> 更改页面,所有其他组件和控件都可以正常加载,但 bootstrap-select 选择除外
感谢您的宝贵时间
【问题讨论】:
标签: angular npm angular-cli bootstrap-select