meteor - How to use routeControllers in a package -
My app is made up of packages, if I set the path with an iron router in a package, then everything works the same way As it should be:
router.out ('/ session', {name: 'ride_sessions.list', template: 'ride session list', action: function () {This.render ();}, data: function () {templateData = {riding session: ridges.fund ()} return template data;}});
But if I try to use a root controller like this:
Riders list controller = root controller. Extension ({template: 'ride session list', action: function) {This.render ();}, data: function () {templateData = {ride session: ridges.fund ()} return template data;}}); Router.route ('/ session', {name: 'ride_sessions.list', controller: 'ridescenslist controller'});
I get this error:
Error: Root Controller 'Ridestresslist Controller' is not defined.
Is this a bug? Or am I doing something wrong ? If I'm not in a smart-package then it works fine.
You need to export all your global package.js
file variable :
package.one (function (API) {... api.export (['ridescenslist controller', ...])});
Comments
Post a Comment