how to call function in angularjs?

Today, We want to share with you how to call function in angularjs?.In this post we will show you Angularjs raise function in ng-click event with example, hear for calling function into another function with in the same Controller Angular Js we will give you demo and example for implement.In this post, we will learn about Angularjs Ng-Keypress Event Handling Directive with an example.

AngularJS Call Function in ng-click Event Example

Example 1: index.html

<!DOCTYPE html>
AngularJs calling Function in ng-click Event Example -
<script src=""></script>
<script type="text/javascript">
var app = angular.module('ngclickApp', []);
app.controller('ngclickCtrl', function ($scope) {
$scope.totoalFlag = 0;
$scope.getdetails = function () {
$scope.totoalFlag = $scope.totoalFlag + 1;
<div ng-app="ngclickApp" ng-controller="ngclickCtrl">
<h2>AngularJs calling Function in ng-click Event Example - -</h2>
<input type="button" style="cursor:pointer" value="Click Here" ng-click ="getdetails()" /><br /><br />
<span style="color:Red">Number of Times you Clicked: {{totoalFlag}}</span>

I hope you get an idea about AngularJS function scope Example with demo.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.