HTML Custom Angular Component - Passing parameters

Hello,
I need to pass parameters for custom HTML component (Custom angular controller).
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:

How should I fix this?

Hi @koblamic,

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

<yourcomponent 
    *ngIf="parameters.ParameterName" 
     property="{{parameters.ParameterName}}">
</yourcomponent>
1 Like

Thank you, that worked.