mardi 21 novembre 2017

How do I pass a value from one .hbs file to another

I am trying to pass the index value from posts.hbs to the delete-post.hbs and then from delete-post.hbs to my delete-post.js function.

posts.hbs

<br>
<h2> Blog Posts </h2>
<ul>


    <li id = >  
    </li><br>


</ul>



delete-post.hbs

<a class="ui red button" >Delete</a>`

delete-post.js

    import Component from '@ember/component';

export default Component.extend
({
  actions:
  {
    deletePost(input)
    {
        alert(input);
    }   
  }

});




Aucun commentaire:

Enregistrer un commentaire