Angularjs Examples

AJS Examples


AngularJS ng-Cloak Directive

The AngularJS ng-cloak directive is used to prevent displaying the content until AngularJS has taken control.

Syntax

<div ng-cloak>{{ 'Tech Strikers' }}</div>

AngularJS ng-Cloak Directive Example

<html>
<head>
<title>My first AngularJS code</title>
<Script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">
</Script>
<Script>
//Defining Controller Using Standard Javascrip Object Constructor
function CustomerController($scope) {
$scope.siteName = "www.TechStrikers.com";
}
</Script>
</head>
<body>
<div ng-app="">
<div ng-controller="CustomerController"> 

<input id="btnButton" type="button" value="Change Font" ng-change="clicked">
<p ng-cloak ng-bind="siteName"></p>
</div>
</div>
</body>
</html>
See Live Example