Permalink
Browse files

service working. AMD working

  • Loading branch information...
1 parent e781c46 commit 9b6ca7828c360d7f669d25e2c6f306a24c1c4d6e @seanhess committed Nov 8, 2012
Showing with 11 additions and 7 deletions.
  1. +2 −2 package.json
  2. +1 −1 public/main.js
  3. +1 −1 public/services/FB.js
  4. +4 −2 public/services/Players.js
  5. +3 −1 public/services/Players.ts
View
@@ -2,7 +2,7 @@
"name": "uarbg2",
"version": "0.0.0",
"description": "uarbg2",
- "main": "app.js",
+ "main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
@@ -21,4 +21,4 @@
"stylus": "0.30.1",
"nib": "0.8.2"
}
-}
+v
View
@@ -46,7 +46,7 @@ require([
//This callback is optional.
angular.element(document).ready(function () {
- angular.bootstrap(document, ['uarbg'])
+ angular.bootstrap(document, ['uarbg2'])
})
})
View
@@ -1,7 +1,7 @@
define(function(require) {
var app = require('app')
-.factory('FB', function($rootScope) {
+ app.main.factory('FB', function($rootScope) {
var FB = function(gameId) {
var ref = new Firebase("https://seanhess.firebaseio.com/uarbg2/" + gameId)
return ref
@@ -1,12 +1,14 @@
-define(["require", "exports"], function(require, exports) {
+define(["require", "exports", "../app"], function(require, exports, __app__) {
+ var app = __app__;
+
var Players = (function () {
function Players() {
this.all = [];
}
return Players;
})();
exports.Players = Players;
- angular.module('services').factory('Players', function ($rootScope, FB, Board, AppVersion) {
+ app.main.factory('Players', function ($rootScope, FB, Board, AppVersion) {
return function (gameId) {
var taunt_list = [
"Oooh yeah!",
@@ -5,6 +5,8 @@
// This service keeps track of all the current players (in an array), and merges moves into your stuff
// Also lets you join
+import app = module("../app")
+
export class Players {
current: any;
winner: any;
@@ -22,7 +24,7 @@ export class Players {
latestVersion: Function;
}
-angular.module('services').factory('Players', function($rootScope:ng.IScope, FB, Board, AppVersion) {
+app.main.factory('Players', function($rootScope:ng.IScope, FB, Board, AppVersion) {
return function(gameId) {

0 comments on commit 9b6ca78

Please sign in to comment.