【发布时间】:2017-12-10 08:28:00
【问题描述】:
我希望扩展 ngx-bootstrap 模态并使用我自己的模板,我该如何做呢?最终产品应该是自定义组件,其行为类似于 ngx-bootstrap 的模态,但它应该预定义模板。
@Injectable()
@Component({
selector: 'register-patient',
templateUrl: 'register-patient.component.html',
styleUrls: ['register-patient.component.scss']
})
export class RegisterPatientComponent extends ModalDirective {
// constructor, my own methods etc.
}
似乎是一个充满希望的开始。但是,当我打开对话框时,我只看到标准背景,没有其他任何东西。我怀疑我的模板文件需要包含一些特殊指令或其他东西,但我在网上找不到任何主题。我也找不到可以复制和修改的原始 ngx-bootstrap html 模板。我需要在register-patient.component.html 中包含什么才能使其正常工作?
【问题讨论】:
标签: angular ngx-bootstrap