Description
The constant tagf adds a constant to the application.Usage
as element:Directive info
- This directive creates new scope.
Parameters
Example
Source
Result

Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
<helper:constant
name="{string}"
value="{string}">
</helper:constant>
| Param | Type | Details |
|---|---|---|
| name | string | The name of the constant |
| value | string | The value of the constant |
<helper:constant name="test" value="banana"></helper:constant>
<span>My Constant: {{test}}</span>
angular.module('lightning')
.controller('ExampleController', ['$scope','$twigkit', function($scope,$twigkit) {
$scope.test = $twigkit.getConstant('test','noValue');
}]);

Was this page helpful?