Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 11, 2020 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/e08ef5559f22b23d8293d838500ed935 to your computer and use it in GitHub Desktop.
Save parzibyte/e08ef5559f22b23d8293d838500ed935 to your computer and use it in GitHub Desktop.
constructor(private carritoService: CarritoService, private dataSharingService: DataSharingService) {
// Comunicación entre componentes
this.dataSharingService.currentMessage.subscribe(mensaje => {
if (mensaje == "car_updated") {
this.refrescarCarrito();
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment