After adding 'loginService' as a parameter to the controller in order to reference the service I want to use, I encountered an error that caused the rest of my angular functions to stop working.
app.controller('loginController', function ($scope, loginService){
$scope.loginUser = function () {
loginService.login();
}
});
However, when I removed the service as a parameter as shown below, it prevented the crashing of the other angular functions on the site, but it also meant that the necessary job wasn't being done.
app.controller('loginController', function ($scope){
$scope.loginUser = function () {
loginService.login();
}
});
The service script has been declared and I am still learning, so any assistance would be greatly appreciated. Thank you!