WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AngularJS ng-bind-template Directive


Example

Bind two articulations to the <p> element:

<div ng-app="myApp" ng-tie template="{{firstName}} {{lastName}}" ng-controller="myCtrl"></div>

<script>
var application = angular.module("myApp", []);
app.controller("myCtrl", function($scope) {
    $scope.firstName = "John";
    $scope.lastName = "Doe";
});
</script>
Try it yourself »

Definition and Usage

The ng-tie template order advises AngularJS to supplant the substance of a HTML component with the estimation of the given expressions.

Use the ng-tie template order when you need to tie more thant one articulation to your HTML element.


Syntax

<element ng-tie template="expression"></element>

Supported by all HTML elements.


Parameter Values

Value Description
expression One or more articulations to assess, each encompassed by {{  }}.