
moises mannarino
Preguntadiciendo Property valueChanges does not exist on type void

moises mannarino
```import { Component } from '@angular/core'; import { LugaresService} from '../services/lugares.service'; import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'app-crear', templateUrl: './crear.component.html', }) export class CrearComponent { lugar:any = {}; id:any=null; constructor(private lugaresService:LugaresService,private route: ActivatedRoute){ this.id=this.route.snapshot.params['id']; if(this.id != 'new'){ this.lugaresService.getLugar(this.id).valueChanges().subscribe(lugar => { this.lugar = lugar; }); } } guardarLugar(){ var direccion= `${this.lugar.direccion},${this.lugar.ciudad},${this.lugar.pais}`; this.lugaresService.obtenerGeoData(direccion) .subscribe((result)=> { this.lugar.lat=result.json().results[0].geometry.location.lat; this.lugar.lat=result.json().results[0].geometry.location.lng; this.lugar.id= Date.now(); if(this.id != 'new'){ this.lugaresService.editarLugar(this.lugar); alert('se edito exitosamete'); } else{ this.lugar.id= Date.now(); this.lugaresService.guardarLugar(this.lugar); alert('se creo exitosamete'); } this.lugar={}; });

Jose L. Silva
Eso es porque valueChanges no es una propiedad, sino un método ó función. Debes colocarlo de la siguiente manera:
valueChanges()
Con los parentesis al final.