AngularJS Tutorial - Call function in ng:controller








We can call function in ng:controller.

Example


<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!--  w w  w.  ja  v a2 s  .  c  o  m-->
<body>
<script type='text/javascript'>

function Main() {
    function blah(v,i,b) {
         //some random function   
    }
    
    console.log(angular.isFunction(blah));
}
</script>
<div ng:controller="Main">
</div>
</body>
</html>

The code above is rendered as follows: