Here is the factory that I am working with:
(function() {
angular.module('temp')
.factory('Factory',Factory);
employeeFactory.$inject = ['$http'];
function employeeFactory($http) {
var factory = {};
var vm = this;
factory.login = function(email,password) {
return $http({
'method': 'POST',
'url': 'http://domain.dev/api/v1/login',
'data': $.param({
'email': email,
'password': password
}),
'headers': {
'Content-Type': 'application/x-www-form-urlencoded'
}
});
return factory;
}
})();
An error message I encounter is:
Uncaught SyntaxError: Unexpected token )
This error points to the last line of code:
})();