我正在使用ngbtabet
(引导程序4.0)来创建登录和登录标签。
默认情况下,第一个选项卡正在加载。当我单击第二个选项卡时,第二个选项卡未加载。
有人知道我想念什么吗?
1)signin-Container.component.html
<div class="row">
<ngb-tabset #tabset>
<ngb-tab id="tab1" title="Signin">
<ng-template ngbTabContent>
<p>Signin elements loads here</p>
</ng-template>
</ngb-tab>
<ngb-tab id="tab2"
title="Login">
<ng-template ngbTabContent>
<p> Login elements loads here</p>
</ng-template>
</ngb-tab>
</ngb-tabset>
</div>
2)signin-container.component.ts
import { Component, OnInit, ViewChild } from '@angular/core';
import { NgbTabChangeEvent, NgbTabset } from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: "signin-container",
templateUrl: "./signin-container.component.html",
styleUrls: ["./signin-container.component.scss"]
})
export class SigninContainerComponent implements OnInit {
constructor() {}
ngOnInit() {}
}
3)app.module.ts
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { SigninContainerComponent } from './signin-container.component';
@NgModule({
declarations: [
SigninContainerComponent
],
imports: [
NgbModule,
FormsModule,
ReactiveFormsModule,
BrowserModule,
]
export class AppModule implements DoBootstrap {
}
更改选项卡后,登录选项卡没有加载吗?