loopbackjs - 'this' inside loopback non static method is null -
i have remote method option isstatic: false
. inside remote method definition, this
undefined.
user.remotemethod('books', { http: {path: '/books', verb: 'get'}, isstatic: false, returns: {root: true, type: 'object'}, }) user.prototype.books = function (cb) { console.log('this ', this); }
i using loopback 3.6.0. appreciated.
Comments
Post a Comment