Call function in ng:controller

Description

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><!--  ww  w .  j a  va  2  s.c om-->
<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>

Click to view the demo





















Home »
  AngularJS »
    AngularJS Example »




Controller
Directives
Expression
Filter
Form
Inject
Scope
Server
Style
Template
Utilities