How can I use a knockout template as content in a bootstrap popover?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s not exactly clear what you are looking for. Here is a sample fiddle that I hope will help:
http://jsfiddle.net/V3nVd/3/
It demonstrates two concepts:
1) Using a Custom Binding to add the desired Popover attributes
2) Using a template to encapsulate the HTML (including custom binding) used to create a button with a popover.
Here are the options you can send into a Popover.
EDIT: http://jsfiddle.net/V3nVd/7/
Updated fiddle to show pulling html content from a rendered template. Also note the use of the html option in the popover initialization.