goinstant/goangular — pull request #46 by mattcreager (2014-01-21 19:33:00+00:00)
Title: feat($goConnection): Enable deferred conn initialization 

@MaheshCasiraghi identified an issue whereby authentication could
only be performed during the Angular configuration stage. The addition
of the `$connect` method now allows developers too configure, and connect
at any point in the life-cycle of their application.

Example:

```js
ourCoolApp.controller('sweetController', function($scope, $goKey, $goConnection) {
var url = "https://goinstant.net/ACCOUNT_NAME/APP_NAME";
var opts = { user: 'eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ...' };

$goConnection.$connect(url, opts).then(function(c) {
return c.room('lobby').join();
}).then(function(result) {
console.log(result.user);
});

$scope.todos = $goKey('todos');
$scope.todos.$sync();
});
```