PGD Directives
Last updated
Last updated
Page Designer provides features to add custom directives to any element on the screen. These directives are essentially custom properties added to an element. This section shows how to add a PGD directive to an element on Page Designer.
How to add: Open your Page in Page Designer. Click on the element for which you want to add the directive.
Click on the Setting and Data tab on the property editor. Click button "+ Add Directive" Click on the Add (+) icon
Enter the attribute you want to add. And choose the value. Users can set a static value to the property or set a value from State. If setting value from state, use syntax {{State.parameterName}}. Click Done once finished
Now save and build the page. On inspection, you can see the attribute is being added to the HTML tag.
Uses of PGD directives: PGD Directives can be used to add custom settings to the element. For e.g. to hide element based on value user can use the ng-hide directive.
Users can use ng-value to add value to an element on condition.
Users can also add value from State or Store.
Users can use ng-class to set class from the value on State or Store.