While try to run the following function in angular
$scope.login = function (user, LoginForm) {
$http.get('http://localhost/Angular/index.php/core/login').success(function (data) {
$scope.message = data;
});
};
it shows the following error
(Im working with this code in webstorm)
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Angular/index.php/api/login:0
Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:63342'
is therefore not allowed access.
http://localhost/Angular/index.php/api/login:0
XMLHttpRequest cannot load http://localhost/LAngular/index.php/api/login
. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:63342'
is therefore not allowed access.
How to fix this?