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,
}
];
$scope.onSubmit = function(form){
console.log(FormDiff.get_diff({adad: 2, adada: 3},{adad: 2, adada: 4}));
$scope.$broadcast('schemaFormValidate');
if (form.$valid){
var credentials = {email: form.email.$modelValue, password: form.password.$modelValue};
......
......@@ -4,11 +4,16 @@
//angular.module('FormDiff', [])
/**
* service to return form diff for all form submits
* this file contains general functions of app.
*/
var general = angular.module('general', []);
general.factory('FormDiff', function(){
/**
* function to return diff of models of submitted form
* @type {{}}
* @params obj1, obj2
*/
var formDiff = {};
formDiff.get_diff = function (obj1, obj2) {
var result = {};
......@@ -20,6 +25,6 @@ general.factory('FormDiff', function(){
result[key] = arguments.callee(obj1[key], obj2[key]);
}
return result;
}
};
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