top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Explain what is string interpolation in angular.js ?

+3 votes
479 views
Explain what is string interpolation in angular.js ?
posted Dec 18, 2014 by Muskan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Here some example for String Interpolate

Javascript Code:

var appmoduel=angular.module('moduleName',[]);

appmoduel.controller('controllerName',['$scope','$interpolate',function($scope,$interpolate)
{
$scope.valuetext = 'click me';
var html = '

{{valuetext}}
';
$scope.interpolate = $interpolate(html)($scope);
}]);

HTML File:

enter image description here

Result

click me
answer May 19, 2015 by Balamurugan Kn
...