T
T
tyoma_koder2021-10-22 18:29:23
Angular
tyoma_koder, 2021-10-22 18:29:23

How to pass data to a page with spooling?

in app.module.ts in rotuniga registered In html
{path: 'link/:type', component: EditAppComponent}

<button routerLink="['/link', data]">Текст</button>

as a result I get the link below and 404 error
/%5B'/link',%20data%5D

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lssssssssssl, 2021-10-23
@tyoma_koder

routerLink="/link/{{data}}"
[routerLink]="'/link/' + data"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question