我有下面的模块,它ng2-smart-table
在我的 html 页面中添加一个组件,如下所示:
<div class="row">
<div class="col-md-6">
<ba-card title="Commandes" baCardClass="with-scroll">
<bar-table></bar-table>
</ba-card>
</div>
</div>
<div class="row">
TEST HERE
</div>
问题是代码 TEST HERE 被模块覆盖,我只有通常显示的条形表,但下面没有任何内容。
//app/pages/foo/detailFoo/detailFoo.module.ts
NgModule({
imports: [
CommonModule,
NgaModule,
Ng2SmartTableModule,
BarModule,
DetailFooRouting
],
declarations: [
DetailFoo
],
exports: [
DetailFoo
],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})
export default class DetailFooModule {}
和组件
//app/pages/foo/detailFoo/detailFoo.component.ts
@Component({
selector: 'foo-detail',
template: require('./detailFoo.html'),
})
export class DetailFoo {
constructor() {
}
}
我称我的组件条形表是这样引用的:
//app/pages/bar/bar.module.ts
@NgModule({
imports: [
CommonModule,
NgaModule,
Ng2SmartTableModule,
routing
],
declarations: [
BarTableComponent
],
exports: [BarTableComponent]
})
export class BarModule {}
//app/pages/bar/barTable.component.ts
@Component({
selector: 'bar-table',
template: '<ng2-smart-table [settings]="settings" (deleteConfirm)="onDeleteConfirm($event)"></ng2-smart-table>'
})
export class BarTableComponent
有人知道为什么不显示 TEST HERE 吗?