var app = angular.module('Login', ['ngResource']);
app.controller('LoginCtrl', function ($scope, $http) {
	$scope.usrname = "";
	$scope.usrpass = "";
	$scope.users = [];
	$scope.validator = "";
	$scope.GetLogin = function() {
		$http.get('js/services/login.php?usrname='+$scope.usrname).
        success(function(data) {
            // here the data from the api is assigned to a variable named users
            $scope.users = data;
        }).then(function (data){
			alert(data['username'][0]);
		});
	};
});
