1
When making a request to a java control that returns a key map and value "String":
@ControllerSupport
public Map< String, String > teste() {
Map< String, String > teste = new HashMap< String, String >();
teste.put( "Teste", "Teste" );
return teste;
}
When printing the request assigned to the variable accessing the service.
console.log($scope.teste);
Returned an error in the javascript log.
Error: [$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object
How to get this value returned from Map in Javascrip?
This variable receives the value of the service that then fetches the value in the java controller on the back.
– Rafael Caetano da Silva