vendredi 24 juillet 2015

send value from controller to route

App = Ember.Application.create();
App.Router.map(function() {
    this.route("cases");
});

App.IndexController = Ember.Controller.extend({
    actions: {
        login: function() {           
            transitionToRoute('cases','data1','data2');//send data to case
         }
    }
});


App.CasesRoute = Ember.Route.extend({
    model: function(xxx1,xxx2) {
        //get 'data'
        alert(xxx1);
    }
});

I want send some data from IndexController to model in CaseRoute, i am beginner and read this but i does not understand. This way for send value to model is correct?




Aucun commentaire:

Enregistrer un commentaire