angular $eval Example – What is $eval in AngularJS?

angular $eval is a function property of the global object. The AngularJS $eval method is used to executes the AngularJS expression on the current scope and returns the result.

angular $eval – AngularJS $scope.$eval() Function

AngularJS’s $parse service processes these expressions. $eval and $parse don’t evaluate JavaScript;

Syntax of angular $eval

$eval([expression], [locals]);

AngularJS $scope.$eval() Function Example


    AngularJS $eval Example -         
AngulerJS $eval Method Example -

{{'Result :- ' + output}}

Don’t Miss : AngularJS Expressions Tutorial With Example

Example : Eval function in angular

    Event Registration - Global Event


This is an example of using $eval in angularjs to call javascript function when their name is given as a string.

Leave a Comment