question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Restangular.service does not have .get() method.

See original GitHub issue

There is an issue:

var test1 = Restangular.all('user').get(1).then(function(res) {
    console.log('test1', res);
}); // Does not work says .get() is not defined

var test2 = Restangular.service('user').get(1).then(function(res2) {
    console.log('test2', res);
}); // works fine

Am I doing anything wrong?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
guinnbergcommented, Mar 22, 2016

With 1.5.2 version it also fails with the service

0reactions
daviesgeekcommented, Aug 31, 2016

@deddu You’re right. The docs are wrong here. That PR has just been merged. I’m not sure what code I was testing when I originally commented (shame on me for not providing a code example!). This should work now as the (updated) docs say.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I add a custom method to a restangular service?
I have tried adding the following to my service with no luck (the method isn't bound to the object) and I just get...
Read more >
Restangular: New Angular service to handle Restful ...
I've developer Restangular, an AngularJS service that will help you get, delete and update Restfull Resources with very few lines and very concise....
Read more >
属性 | RestAngular
This method accepts 1 parameter, it could be: Boolean: Specifies if all elements should be parentless or not; Array: Specifies the routes (types)...
Read more >
restangular - npm Package Health Analysis - Snyk
Restangular is an AngularJS service that simplifies common GET, POST, ... Restangular doesn't have problem with trailing slashes, additional : in the URL, ......
Read more >
AngularJS Data Models: $http VS $resource VS Restangular
Note that each resulting job should be able to have a getResult() ... In this approach, we created a service that made the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found