Commit c784b09b authored by Evren Kutar's avatar Evren Kutar

remove not needed

parent f8d98a0a
...@@ -74,7 +74,6 @@ login.controller('LoginCtrl', function ($scope, $q, $timeout, $http, $location, ...@@ -74,7 +74,6 @@ login.controller('LoginCtrl', function ($scope, $q, $timeout, $http, $location,
} }
]; ];
$scope.onSubmit = function(form){ $scope.onSubmit = function(form){
console.log(FormDiff.get_diff({adad: 2, adada: 3},{adad: 2, adada: 4}));
$scope.$broadcast('schemaFormValidate'); $scope.$broadcast('schemaFormValidate');
if (form.$valid){ if (form.$valid){
var credentials = {email: form.email.$modelValue, password: form.password.$modelValue}; var credentials = {email: form.email.$modelValue, password: form.password.$modelValue};
......
...@@ -4,11 +4,16 @@ ...@@ -4,11 +4,16 @@
//angular.module('FormDiff', []) //angular.module('FormDiff', [])
/** /**
* service to return form diff for all form submits * this file contains general functions of app.
*/ */
var general = angular.module('general', []); var general = angular.module('general', []);
general.factory('FormDiff', function(){ general.factory('FormDiff', function(){
/**
* function to return diff of models of submitted form
* @type {{}}
* @params obj1, obj2
*/
var formDiff = {}; var formDiff = {};
formDiff.get_diff = function (obj1, obj2) { formDiff.get_diff = function (obj1, obj2) {
var result = {}; var result = {};
...@@ -20,6 +25,6 @@ general.factory('FormDiff', function(){ ...@@ -20,6 +25,6 @@ general.factory('FormDiff', function(){
result[key] = arguments.callee(obj1[key], obj2[key]); result[key] = arguments.callee(obj1[key], obj2[key]);
} }
return result; return result;
} };
return formDiff; return formDiff;
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment