An angular module for using the sails api
5 people use it
Author: Fbb82394e50fa1c4d066d6f76fb14e09? kyjan

Angular Sails

This small module allows you to use Sails.JS's awesome api with AngularJS.

Just add a dependency to your module and controllers and get it going!

Install it:


A small example:

API Refenrence


Angular Sails wraps the native sails.js REST functions. For further information check out the sails docs and Mike's Screencast

reconnect(url, options)

Angular Sails connects to the current URL by default. Sometimes you need to connect your socket to another URL. You can reconnect your socket connection like this: javascript $sails.reconnect('');


A wrapper for the disconnect function. javascript $sails.disconnect();

emit(event, data)

A wrapper for's emit function. javascript $sails.emit('something very cool', { foo: 'bar' });

comments powered by Disqus
This page was last updated about 4 years ago.