dimanche 12 novembre 2017

Cannot call a router action from the view

Here are my routes :

this.route('produits', function(){ 
  this.route('new');
  this.route('edit', { path: '/:produit_id/edit' }, function() {
    this.route('documents');
  });
});

Here is my action in routes/produit/edit/documents.js :

actions: {
    refreshRoute() {
      this.refresh();
    }   
}

In document.hbs as soon as I use , it result in the following error: Assertion Failed: An action named 'refreshRoute' was not found in (generated produits.edit.documents controller)

Why is it not working, when using the same syntax works in CRUD views?




Aucun commentaire:

Enregistrer un commentaire