MarcinMichalik / bsmodal

MIT License
5 stars 3 forks source link

What do you mean by "dynamically created content"? You can give an example of what you would like to do. #2

Closed Munyasi closed 5 years ago

Munyasi commented 5 years ago

What do you mean by "dynamically created content"? You can give an example of what you would like to do.

You use BsModal class with method open. This method return BsModalRef and in BsModalRef is componentInstance. For example: You have variable named cars in your modal component, then you can do:

const modalRef = bsModal.open(MyComponent);
modalRef.componentInstance.cars = [{brand: "Ford", color: "balck"}, {brand: "BMW", color: 'white"}]

Originally posted by @MarcinMichalik in https://github.com/MarcinMichalik/bsmodal/issues/1#issuecomment-486097816