I have my code in Gist: https://gist.github.com/rickymuvel/8ddc4d14d90877329447ddde9c0aa835
I'm using PrimeNG and specifically my problem is with the Autocomplete module. Simply do not make the calls to the specific path in the ubigeo.service.ts file. Here is a review of what each file does:
usuario.component.html I have cleaned it so that it only appears the field that causes me problems. Actually in HTML there is not much to do because the information if it arrives to the service, but the "post" request is not resolved.
usuario.component.ts uses two services (at the moment, because I plan to add three more to use). It's the complete code.
ubigeo.service.ts is the service with which I have the error. However what fails here is the "post" request, simply that line is not executed.
usuario.service.ts contains the logic corresponding to the user. I do not know if it influences the error but I post it.
Since your cargarUbigeo
service call is an observable
, you have to subscribe()
, else observable
won't fire.
Add it and see if you get a callback:
Buscar(event){
this._ubs.cargarUbigeo(event.query )
.subscribe(data => {
console.log(data);
})
}