vendredi 19 février 2016

set variable in template file from routes file

I have this code in my index.js file:

<button {{action 'showHotspots'}} class="btn btn-success padding">{{hotspotCategory.name}}</button>

I have the showHotspots method in my routes/index.js file:

showHotspots: function( selection ) {
  this.toggleProperty( 'idFromButton' );
}

The method should toggle this part in my template:

{{#if idFromButton}}
  <p>Test1</p>
{{/if}}

However this is not working, when I do it as a component it works but I need the Test1 on a specific place on my page (below all the generated buttons). When I do it in components the Test1 gets displayed between the buttons.




Aucun commentaire:

Enregistrer un commentaire