ngBind directive

The ngBind directive is generally applied to a span element and replaces the content of the element with the results of the provided expression. It has the same meaning as that of the double curly markup, for example, {{expression}}.

Though alternative is available, this is used because when the page is being compiled, there is a moment when the raw state of the expressions(curly braces) is shown and it wont be a good experience to the user. Since the directive is defined by the attribute of the element, it(curly brace expressions) is invisible to the user.

The following is an example of the ngBind directive usage:
index.html
snippet
<!doctype html>
<html ng-app="parking">
<head>
<title>Parking</title>
<script src="angular.js"></script>
<script>
var parking = angular.module("parking", []);
parking.controller("parkingCtrl", function($scope) {
$scope.appTitle = "Parking";
});
</script>
</head>
<body ng-controller="parkingCtrl">
<h3 ng-bind="appTitle"></h3>
</body>
</html>
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 # # # # #