mercredi 16 août 2017

How to get `check` box value from tempate to router?

In my ember page, I don't have the controller. But I have the router and hbs file. when the user click on hbs file ( template) how can i retrive the value ( true/false) in my router method.

here is my template :

<div class="agreementContent">
            
        </div>

my router:

import Ember from 'ember';

export default Ember.Route.extend({
    model(params){
        console.log('got the model', params );
        return this.store.peekRecord('card-list', params.id );
    },
    actions:{
        goToTerms(){
            console.log("confirm clicked");
        },
        acceptTerms( event ){
            var value = this.get('terms');
            console.log("accept Terms clicked", value );//undefined
        }
    }
});




Aucun commentaire:

Enregistrer un commentaire