O'Reilly logo

Learning Web Development with Bootstrap and AngularJS by Stephen Radford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Alternative ways of connecting

We've already explored a couple of ways we can connect to a server and have configured our web app to take advantage of ngResource. There are other modules we can use to connect to a server as well, and we're going to take a quick look at a couple of them.

RestAngular

RestAngular is a community project that provides a service to connect to RESTful APIs—much like ngResource. It does have a few significant differences that are worth being aware of.

The most important thing to note is that RestAngular uses promises just like $http. This means you get access to that nice pattern to determine whether a call was successful or not, but it does mean there are a few extra steps, and we can't just assign it to a model.

Whilst ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required