我感兴趣的是如何TemplateRef通过传递一个string例子来获得一个.
TemplateRef
string
我不想通过组件html获取它,因为我只想将它保存在配置中以用于所有组件.我正在引用NgbDatePickerConfig可以在这里查看的ng-bootstrap :https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/datepicker/datepicker-config.ts.
NgbDatePickerConfig
angular2-template ng-bootstrap angular
angular ×1
angular2-template ×1
ng-bootstrap ×1