0

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

4

1 回答 1

0

Why you want to do so. You can achieve what you want with parent component controlling the child modal component. Check this stackoverflow question Similar question

于 2017-07-09T08:55:52.970 回答