jeudi 29 juin 2017

Issue while trying to append route parameter in js

Below is my js code that is appending the route and its parameter in anchor tag.

var href = "{!! route('ShowUserMainForm', ['RoleID'=>" + row.RoleID + "]) !!}";

var UserColumn = "<td><a href=' " + href + "'><button>Users</button></a></td>";

It gives below url

http://localhost:1234/system-users/RoleID?%20+%20row.RoleID%20+%20

I am expecting below.

http://localhost:1234/system-users/1

Am I missing anything?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire