Description

The Set directive sets a variable in the view to a new variable in the view controller.

Usage

as element:
<helper:set
       var="{string}"
       value="{string}">
</helper:set>

Directive info

  • This directive creates new scope.

Parameters

ParamTypeDetails
varstringThe name of the new variable
valuestringThe variable to copy

Example

Source

<helper:set var="myText" value="'My Text Result'"></helper:set>
<p><strong>myText:</strong> {{myText}}</p>

Result

Result