billpull / knockout-bootstrap

A plugin that adds custom bindings for twitter bootstrap objects such as tooltips and popovers.
233 stars 69 forks source link

options not working in knockout 3.3.0 #76

Open linuxjcq opened 9 years ago

linuxjcq commented 9 years ago

Hi, I use knockout 3.3.0 work with knockout-bootstrap newest version, I found options not working, below is my code:

<button class="btn btn-success" 
data-bind="popover: {template: 'addGroup', placement: 'left', title: ''}">
       <i class="ion-plus-round"></i>&nbsp;新建分组
</button>

When I use knockout-bootstrap 0.2.0, it works well

Thanks

Tantrisse commented 8 years ago

Hi @linuxjcq ! I don't know if you find your answer but yes, knockout-bootstrap works with knockout 3.3.0.

After having explored the sources, I found that you have to declar your options into a object options like this :

<button class="btn btn-success" 
data-bind="popover: {template: 'addGroup', options : { placement: 'left', title: '' } }">
       <i class="ion-plus-round"></i>&nbsp;新建分组
</button>

Best, Tristan.