ember.js - Ember-js Onclick function not work -


im used bootstrap v4-alpha im added pop on working, need add popover-content on click function not fire in ember-js, how put onclick function in emebr-js im used onlick event

<li class="list-group-item" onclick={{action `'event'}}>airport pickup</li> 

this code sample add-newbooking.hbs

<div class="form-group">         <a href="#" data-toggle="popover" data-placement="bottom" data-toggle="popover" title="bill category">           <input type="text" class="form-control" id="formgroupexampleinput" placeholder=""></a>       </div>  <title>bootstrap example</title>  <!-- loaded popover content --> <div id="popover-content" style="display: none">   <ul class="list-group custom-popover">     <li class="list-group-item" onclick={{action 'event'}}>airport pickup</li>     <li class="list-group-item" >food , beverage</li>     <li class="list-group-item">yoga class</li>   </ul> </div>   <script>$(document).ready(function() {   $('[data-toggle="popover"]').popover({     html: true,     content: function() {       return $('#popover-content').html();     }   }); });</script> 

add-newbooking.js

import ember 'ember';  export default ember.component.extend({   actions:{     event: function () {       console.log("ppessssssss")     }   } }); 

the guides have a whole section on this

<li class="list-group-item" {{action 'event'}}>airport pickup</li> 

you better off adding link or button inside list item though button focusable etc


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -