is there a way to use base_url() in angularJS?
here's my code:
it worked fine. but I'm just curious if there's a way for me to use base_url like in the comment of the code, than typing the whole fixed url.
$scope.login = function(){
    console.log($scope.users);
    var inputs = 'myData=' + JSON.stringify($scope.users);
    $http({
        method:'POST',
        url:'lib/login_c.php',
        data: inputs,
        headers:{'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8'}
    }).success(function(res){
        console.log(res);
        if(res == 1){
             $window.location.href = "http://localhost/angularjs/index.php";
             //$windows.location.href=baseurl() + '/index.php';
        }else{
            $scope.message = true;
        }
    });
};

