I am trying to get a list through a url using the GET
method, but it generates a very confusing error, since it is the first time I see it.
Uncaught SyntaxError: Unexpected token .
He tells me that I have the error in the next line
grupos.$inject = ['$http'];
function grupos($http){
function obtenerGrupos(){
var url;
url = 'http://localhost:1890/Grupos1';
return {
$http.get(url);
};
};
return {
obtenerGrupos: obtenerGrupos
};
}
According to the editor that I use, VS Code, it tells me that I have to put two points : instead of a point . . And if I place to try to see what happens, tell me this.
Uncaught SyntaxError: Unexpected token ;