I have a WebService implemented with JAX-RS
and I'm consuming it with a service ( utilizando Angular 2
)
Follow the service:
@Injectable()
export class ModeloService {
constructor(private http: Http) {
}
getAll(): Observable<Modelo[]> {
return this.http.get(myEnvironment.MODELO_SERVICE_PATH)
.map(res => <Modelo[]> res.json());
}
}
Modelo
is this my class:
export class Modelo{
id: number;
type: string;
size: number;
constructor() {
}
}
It happens that the return of the function map()
, mounts the following object JavaScript
, that is, it inserts this property _$visited
: true:
{
"id": 28,
"type": "type",
"size": null,
"_$visited": true
}
This "