I'm trying to pass two parameters by url in angular 5 but it doesn't let me I'm doing it like this
let administrador = this.usuario.admin
let username = this.usuario.username
this._http.get(`http://localhost/api/public/archivo/admin/${administrador},
${username}`,{headers:headers}).subscribe(data=>{
}.....
Any solution ?
I don't know if it will help you, but I think that to refer to that variable in the .ts file, you don't need to put it between {}, apart from the fact that to refer to the value that administrator contains in the html, it would be with double like this -> {{admin}}
Therefore, in order for it to take the administrator variable in the place where you are placing it, it would be enough to remove the {}. I'm not entirely sure though, since I'm also fighting with ionic right now. Apart from the fact that you are not placing the second variable divided with "/", but you are placing ","
Even so, to know if the requests are carried out correctly, I recommend that you use Postman, this can help you a lot.
Answer to the original question
A literal Template or text string Templates must be encapsulated by "backticks" or inverted quote like this
Otherwise it will take everything as text ignoring the variables