Skip to content

Commit

Permalink
fixed the controller issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidJDJ committed Oct 4, 2015
1 parent fbfadc8 commit 407e65b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
14 changes: 6 additions & 8 deletions client/js/homeController.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
saburiKonnect.controller('homeController', function($scope, $location,NewOrganisationFactory){
saburiKonnect.controller('homeController', function($scope, $location, NewOrganisationFactory){

$scope.thirteen = function() {
data = [{label: "age 5-7", value: 1000}, {label: "age 8-10", value: 2500}, {label: "age 11-12", value: 2750}, {label: "age 13-14", value: 2750}, {label: "age 15-17", value: 2750}, {label: "age 18-20", value: 2750}]
Expand Down Expand Up @@ -189,16 +189,14 @@ saburiKonnect.controller('homeController', function($scope, $location,NewOrganis
saburiKonnect.factory('NewOrganisationFactory',function($http){
var factory = {};
factory.login = function(info,callback){
$http.post('/login',info).success(function(output)
{
$http.post('/login', info).success(function(output){
callback(output);
});
};
factory.addOrganisation = function(info,callback){
});
};
factory.add_Organisation = function(info,callback){
$http.post('/add_organisation', info).success(function(output){
callback(output);
});
});
};

return factory;
});
22 changes: 9 additions & 13 deletions client/js/loginController.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

saburiKonnect.factory('NewOrganisationFactory',function($http){
var factory = {};
factory.addOrganisation = function(info,callback){
$http.post('/add_organisation', info).success(function(output){
callback(output);
});
};
return factory;
});
// saburiKonnect.factory('NewOrganisationFactory',function($http){
// var factory = {};
// factory.addOrganisation = function(info,callback){
// $http.post('/add_organisation', info).success(function(output){
// callback(output);
// });
// };
// return factory;
// });

saburiKonnect.controller('newKidController', function($scope,$location,$routeParams, NewKidFactory){
$scope.register = function()
Expand All @@ -17,6 +16,3 @@
};

});



0 comments on commit 407e65b

Please sign in to comment.