<lifecycle:required
object="{string}">
</lifecycle:required>
Param | Type | Details |
---|---|---|
object | string | The object in question |
<button class="tk-stl-button" ng-click="toggle()">Toggle</button>
<lifecycle:required object="value">
<p>I only appear when "value" has a value.</p>
</lifecycle:required>
angular.module('lightning')
.controller('ExampleController', ['$scope', function($scope) {
$scope.toggle = function(){
if($scope.value == undefined){
$scope.value = 'A Value';
} else {
$scope.value = undefined;
}
}
}]);
Was this page helpful?