我希望扩展 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
使其正常工作?