You should pass a reference to the function instead of invoking the function and getting it returned value.
With this code:
organizationFactory(http)
You're invoking the function passing in http
which does not exist in that context.
To pass a function reference, just organizationFactory
is enough.
Replace:
masterApp.factory("organizationFactory", ["$http", organizationFactory(http)]);
masterApp.controller("organizationCtrl", ["$scope", "organizationFactory",organizationCtrl(scope,organizationFactory)])
With:
masterApp.factory("organizationFactory", ["$http", organizationFactory]);
masterApp.controller("organizationCtrl", ["$scope", "organizationFactory",organizationCtrl])