Can i send a variable from index.html to app.component.ts i have this script in index.html and i want to send url which is variable before removing query params to app.component.ts
<script type="text/javascript">
var url = window.location.toString();
if(url.indexOf("?") > 0) {
var sanitizedUrl = url.substring(0, url.indexOf("?"));
window.history.replaceState({}, document.title, sanitizedUrl);
}
</script>