3
有没有办法访问全球注册的插件?我已经阅读了关于hapi-sequelize的内容,并且希望将其实施到我的hapi应用程序中。这里是documentation。它指出那里,你可以在全球使用的代码访问它:访问插件全球hapijs
var db = plugin.plugins['hapi-sequelized'].models; db.Test.create({ email: '[email protected]', password: 'alskfjdfoa' });
我已经试过了insterting到我的控制器,但它似乎并没有认识到该插件变量。
哇,非常感谢! – mateeyow 2014-10-08 08:56:45
不错...“request.variableInParentJsFile”...谢谢! – 2016-09-28 03:52:11