Skip to content

Commit

Permalink
chore(*): arange files to new promise api
Browse files Browse the repository at this point in the history
  • Loading branch information
janpantel committed Mar 12, 2014
1 parent 7e14c11 commit b790699
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ var app = angular.module("MyApp", ['ngSails']);

app.controller("FooController", function ($scope, $sails) {
$scope.bars = [];

(function () {
$sails.get("/bars", function (data) {
$scope.bars = data;
});

$sails.get("/bars")
.success(function (data) {
$scope.bars = data;
})
.error(function (data) {
alert('Houston, we got a problem!');
});


$sails.on("message", function (message) {
if (message.verb === "create") {
$scope.bars.push(message.data);
Expand Down
2 changes: 1 addition & 1 deletion angular-sails.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-sails",
"version": "0.1.3",
"version": "0.2.0",
"authors": [
"Jan-Oliver Pantel <[email protected]>"
],
Expand Down

0 comments on commit b790699

Please sign in to comment.