# HTML Custom Angular Component - Passing parameters

**URL:** <https://forum.radzen.com/t/html-custom-angular-component-passing-parameters/5378>\
**Category:** Angular\
**Created:** [October 23, 2020, 11:50am UTC](https://forum.radzen.com/t/html-custom-angular-component-passing-parameters/5378 "2020-10-23T11:50:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![koblamic](https://forum.radzen.com/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@koblamic](https://forum.radzen.com/u/koblamic)\
**Post date:** [October 23, 2020, 11:50am UTC](https://forum.radzen.com/t/html-custom-angular-component-passing-parameters/5378/1 "2020-10-23T11:50:22Z")

</div>

Hello,  
I need to pass parameters for custom HTML component ([Custom angular controller](https://www.radzen.com/blog/highcharts-integration/)).  
When I attempt to pass static string, then it works fine.  
But when I try to pass JS variable it fails because of it is undefined (it is probably due to time events and in time of reading of JS value, there is nothing).

For example I need to pass parameter from query string:

 ![image](https://forum.radzen.com/uploads/default/original/2X/f/f13d0a1e6093bbb13261cdf8afa0ed54c6c1db83.png)

How should I fix this?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 23, 2020, 11:57am UTC](https://forum.radzen.com/t/html-custom-angular-component-passing-parameters/5378/2 "2020-10-23T11:57:12Z")

</div>

Hi @koblamic,

This should be the syntax. You can add an \*ngIf to be sure the component initializes when the parameter is available:

```auto
<yourcomponent 
    *ngIf="parameters.ParameterName" 
     property="{{parameters.ParameterName}}">
</yourcomponent>

```

---

<div class="post-metadata">

**Author:** ![koblamic](https://forum.radzen.com/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@koblamic](https://forum.radzen.com/u/koblamic)\
**Post date:** [October 23, 2020, 1:05pm UTC](https://forum.radzen.com/t/html-custom-angular-component-passing-parameters/5378/3 "2020-10-23T13:05:25Z")

</div>

Thank you, that worked.
