Angularjs Examples

AJS Examples

AngularJS ng-bind-html Directive

The ng-bind-html directive is used to bind inner HTML property of an HTML element.


<p ng-bind-html="myHTML"></p> 

AngularJS ng-bind-html Directive Example

<title>My first AngularJS code</title>
<script SRC="">
<script src="//"></script>
//Defining Controller Using Standard Javascrip Object Constructor
  //Defining Controller Using AngularJS Module  
var app = angular.module('yourApp', ['ngSanitize']);  
    app.controller('CustomerController', function($scope) {  
        $scope.myHTML = 'This is HTML bind example 
		AngularJS Built in Directives'; 
<div ng-app="yourApp">
<div ng-controller="CustomerController"> 
<p ng-bind-html="myHTML"></p>

See Live Example