compound icon indicating copy to clipboard operation
compound copied to clipboard

SHARING CODE ACROSS CONTROLLERS

Open weber opened this issue 11 years ago • 0 comments

Попытка использовать кода меж контроллерами как это описано в документации приводит к ошибке: 500 Error: userRequired is not defined Может я что то делаю не так или ...

application_controller.js

publish('requireUser', requireUser);

function requireUser () {
  // ...
}

products_controller.js

load('application'); // note that _controller siffix omitted
before(use('userRequired'), { only: 'products' });

weber avatar Jul 30 '14 18:07 weber