Before we jump into the topic you should also know $eval in alert() and then you can also identify the difference between them.
$parse in a type of service module available in ng-model of AngularJs.
In order to explain what really $parse is let us consider the following sample JavaScript code:
$scope.demoParse=function(){
var f=$parse("a*b");
}
Here it should be noted that the expression $parse("a*b") doesn't returns the result instead it returns a template function because $parse in not
working on a scope.But now the returned function can be used for accessing the scope.
$scope.demoParse=function(){
var f=$parse("a*b");
var r=f($scope);
}
once var r=f($scope); is applied it can be used to stored result in var r.
To Sum up things: we can say that in $parse we can use multiple object to access parse (Here the object is $scope other object can be $rootscope) but this is not in the case of $eval where only the specified scope for a variable can access the function and can work only in the current scope
Hope it helps!!
Want to know more about Angular? Get your Angular Course today and become certified.
Thank you!!