How to encode the URL query params in Angular. For example I am passing one query params as some URL as below.
http://localhost:8080/homecontroller?siteurl=http://example.com?name=test name&[email protected]
Due that URL Param(siteurl) URL got broken. How to encode with some library without manual encoding?