You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecated warnings when generating Loopback Angular service #2593
A few days ago, I started noticing some deprecated warnings when using the lb-ng command to generate the Angular client service.
strong-remoting deprecated getFullPath() is deprecated, use getEndpoints()[0].fullPath instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:37:287
strong-remoting deprecated getHttpMethod() is deprecated, use getEndpoints()[0].verb instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:94:12
strong-remoting deprecated getFullPath() is deprecated, use getEndpoints()[0].fullPath instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:42:130
strong-remoting deprecated getHttpMethod() is deprecated, use getEndpoints()[0].verb instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:42:214
strong-remoting deprecated getHttpMethod() is deprecated, use getEndpoints()[0].verb instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:94:48
The client service seems to be properly generated, but just wanted to check if these warnings are problematic or not.
just wanted to check if these warnings are problematic or not.
We deprecated getFullPath() and getHttpMethod() since they were designed for single path and method; now we have implemented getEndpoints, by which you can get methods as well as paths, also it works for multiple paths and methods.
So the equivalent of your previously used getFullPath() and getHttpMethod () would be getEndpoints()[0].fullPath and getEndpoints()[0].verb respectively.
Hope this answers your question. If so I will close this ticket soon.
Thanks a lot for taking the time to answer.
The thing is I don't think I use these deprecated methods explicitly myself. These warning are shown when generating the Angular client service for the API I developed (when issuing the command lb-ng server/server.js <path_to_the_generated_service>)
Would you know what I should do in order to suppress these warnings? Or can I safely ignore them?
Activity
Amir-61 commentedon Aug 8, 2016
Hello @jmereaux,
We deprecated
getFullPath()andgetHttpMethod()since they were designed for single path and method; now we have implementedgetEndpoints, by which you can getmethodsas well aspaths, also it works for multiple paths and methods.So the equivalent of your previously used
getFullPath()andgetHttpMethod ()would begetEndpoints()[0].fullPathandgetEndpoints()[0].verbrespectively.Hope this answers your question. If so I will close this ticket soon.
Thanks!
jmereaux commentedon Aug 9, 2016
Hello @Amir-61
Thanks a lot for taking the time to answer.
The thing is I don't think I use these deprecated methods explicitly myself. These warning are shown when generating the Angular client service for the API I developed (when issuing the command
lb-ng server/server.js <path_to_the_generated_service>)Would you know what I should do in order to suppress these warnings? Or can I safely ignore them?
Thanks
Amir-61 commentedon Aug 9, 2016
Hi @jmereaux,
What version of
loopback-sdk-angularare you using? It seems it is solved in version1.9.0.I believe @davidcheung took care of warnings by PR#229
jmereaux commentedon Aug 9, 2016
Hi @Amir-61
I was using 1.7.0.
Upgraded strongloop to 6.0.1 (which includes loopback-angular-sdk@1.9.0) and the warnings disappeared.
Thanks :-)