<body ng-app="SampleMVCApp"> <div ng-controller="SampleController"> <h2>{{getText()}}</h2> </div> </body>
angular.module("SampleMVCApp", []) .controller("SampleController", function ($scope) { $scope.getText = function(){ return "Howzzaaatttt!"; }; });