driftyco/ng-cordova — pull request #475 by ramonmaruko (2014-12-05 01:49:28+00:00)
Title: Fix: subscribe callback is only called once

The success callback for the subscribe calls are long running callbacks.

While subscribing with `\r\n` as the delimiter; when the device sends the data `hello\r\nworld`, I will only be able to receive `hello`.

This fix changes the `subscribe` and `subscribeRawData` API. Instead of doing:

```javascript
$bluetoothSerial.
subscribe().
then(function (line) {
doSomethingWith(line);
});
````

It would now be:

```javascript
$bluetoothSerial.
subscribe().
then(null, null, function (line) {
doSomethingWith(line);
});
````