Angular Sails
This module allows you to use Sails.JS's awesome socket.io api with AngularJS.
Just add a dependency to your module and controllers and get it going!
Install it:
bower install angular-sails
You must also include sails.io-client in order to use this.
$http
?
Switching from angular's Angular Sails is a drop-in replacement for Angular's $http
service. If you are currently using $http
with sailsjs then switching to sockets is a snap, just replace $http
with $sails
!
Usage
A small example:
var app = angular; //OPTIONAL! Set socket URL!app; app;
API Reference
Sails.JS REST
Angular Sails mimics Angular's $http
service to provide a drop-in socket replacement for http.
For more information check out angular's $http
docs
Note: Angular Sails does not have a jsonp
method as jsonp is a specific implementation of HTTP