Pass a variable between components | Angular 7

0

I have an application that shows some categories for example the url of 1 category would be like that and the components would be CategoryComponent ...

miweb.com/patienetes /

and I want that when you press a product from the category page send the product object with all the information to the next component that would be ProductComponent with the URL the information I do not want to pass or URL.

miweb.com/patienetes/patinete-extreme-5000

I hope to have explained myself well, thanks and best regards.

    
asked by Agustin Navarro 02.01.2019 в 17:07
source

1 answer

0

The solution you have taken is to establish in the database as a primary key a value that if you can pass through URL for example the name of the product, in this almost the name of the product is Scooter Extreme 5000 as the ID of this product as primary key is scooter-extreme-5000 and this is what happened by URL getting the URL I wanted and with the categories I do the same.

miweb.com/patienetes/patinete-extreme-5000

Greetings and thanks to all for the help.

    
answered by 03.01.2019 в 11:04