Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .controller("loginController", function($scope, $location, $rootScope){
- $scope.login = function() {
- var user = $scope.username;
- var password = $scope.password;
- var result = $scope.username + $scope.password;
- console.log(result);
- if (user == "admin" && password == 'admin'){
- $rootScope.loggedIn = true;
- $location.path('/welcome');
- } else {
- alert("INVALID CREDENTIALS");
- }
- }
- .controller('welcomeController', function($scope){
- $scope.message = "welcome here"
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement