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

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -