access 属性 setup in service setup() in hook

access property set in service setup() in hook

在服务设置() 中设置一个属性。需要在服务的挂钩中访问 属性。

setup(app) {
    this.app = app;
    this.meta = { mod: 'verify' };
}

如何在服务挂钩中服务属性'meta'?

尝试过 context.service context.meta

属性 在 context.service 中可用,访问方式如下

const meta = context.service.meta;

不确定是否有任何其他方式访问它。