I’ve managed to add authentication with the help of a Lynda tutorial, I did run into some troubles with the script:
My Code
myApp.controller('RegistrationController',
['$scope', 'Authentication',
function($scope, 'Authentication') {
$scope.login = function() { //calls the login function from login.html
Authentication.login($scope.user);
};
$scope.register = function() {
Authentication.register($scope.user);
};
}]);
Turns out i used some ‘ ‘s when I shouldn’t have, but it took me more time than I’d like to admit to find.